MCPcopy Index your code
hub / github.com/docker/cli / dockerSpanExporter

Function dockerSpanExporter

cli/command/telemetry_docker.go:94–113  ·  view source on GitHub ↗
(ctx context.Context, cli Cli)

Source from the content-addressed store, hash-verified

92}
93
94func dockerSpanExporter(ctx context.Context, cli Cli) []sdktrace.TracerProviderOption {
95 endpoint, secure := dockerExporterOTLPEndpoint(cli)
96 if endpoint == "" {
97 return nil
98 }
99
100 opts := []otlptracegrpc.Option{
101 otlptracegrpc.WithEndpoint(endpoint),
102 }
103 if !secure {
104 opts = append(opts, otlptracegrpc.WithInsecure())
105 }
106
107 exp, err := otlptracegrpc.New(ctx, opts...)
108 if err != nil {
109 otel.Handle(err)
110 return nil
111 }
112 return []sdktrace.TracerProviderOption{sdktrace.WithBatcher(exp, sdktrace.WithExportTimeout(exportTimeout))}
113}
114
115func dockerMetricExporter(ctx context.Context, cli Cli) []sdkmetric.Option {
116 endpoint, secure := dockerExporterOTLPEndpoint(cli)

Callers 1

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…