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

Method Detect

cli/command/telemetry.go:166–174  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

164)
165
166func (serviceNameDetector) Detect(ctx context.Context) (*resource.Resource, error) {
167 return resource.StringDetector(
168 semconv.SchemaURL,
169 semconv.ServiceNameKey,
170 func() (string, error) {
171 return filepath.Base(os.Args[0]), nil
172 },
173 ).Detect(ctx)
174}
175
176// Detect returns a *Resource that describes the OpenTelemetry SDK used.
177func (telemetrySDK) Detect(context.Context) (*resource.Resource, error) {

Callers

nothing calls this directly

Calls 1

DetectMethod · 0.45

Tested by

no test coverage detected