MCPcopy Index your code
hub / github.com/coder/coder / HoneycombExporter

Function HoneycombExporter

coderd/tracing/exporter.go:139–154  ·  view source on GitHub ↗
(ctx context.Context, apiKey string)

Source from the content-addressed store, hash-verified

137}
138
139func HoneycombExporter(ctx context.Context, apiKey string) (*otlptrace.Exporter, error) {
140 opts := []otlptracegrpc.Option{
141 otlptracegrpc.WithEndpoint("api.honeycomb.io:443"),
142 otlptracegrpc.WithHeaders(map[string]string{
143 "x-honeycomb-team": apiKey,
144 }),
145 otlptracegrpc.WithTLSCredentials(credentials.NewClientTLSFromCert(nil, "")),
146 }
147
148 exporter, err := otlptrace.New(ctx, otlptracegrpc.NewClient(opts...))
149 if err != nil {
150 return nil, xerrors.Errorf("create otlp exporter: %w", err)
151 }
152
153 return exporter, nil
154}

Callers 1

TracerProviderFunction · 0.85

Calls 2

NewMethod · 0.65
ErrorfMethod · 0.45

Tested by

no test coverage detected