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

Method Detect

cli/command/telemetry.go:177–184  ·  view source on GitHub ↗

Detect returns a *Resource that describes the OpenTelemetry SDK used.

(context.Context)

Source from the content-addressed store, hash-verified

175
176// Detect returns a *Resource that describes the OpenTelemetry SDK used.
177func (telemetrySDK) Detect(context.Context) (*resource.Resource, error) {
178 return resource.NewWithAttributes(
179 semconv.SchemaURL,
180 semconv.TelemetrySDKName("opentelemetry"),
181 semconv.TelemetrySDKLanguageGo,
182 semconv.TelemetrySDKVersion(otelsdk.Version()),
183 ), nil
184}
185
186// cliReader is an implementation of Reader that will automatically
187// report to a designated Exporter when Shutdown is called.

Callers 2

DetectMethod · 0.45

Calls

no outgoing calls