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

Function filterResourceAttributesEnvvar

cli/command/telemetry.go:241–249  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239const resourceAttributesEnvVar = "OTEL_RESOURCE_ATTRIBUTES"
240
241func filterResourceAttributesEnvvar() {
242 if v := os.Getenv(resourceAttributesEnvVar); v != "" {
243 if filtered := filterResourceAttributes(v); filtered != "" {
244 _ = os.Setenv(resourceAttributesEnvVar, filtered)
245 } else {
246 _ = os.Unsetenv(resourceAttributesEnvVar)
247 }
248 }
249}
250
251// dockerCLIAttributePrefix is the prefix for any docker cli OTEL attributes.
252// When updating, make sure to also update the copy in cli-plugins/manager.

Callers 1

InitializeMethod · 0.85

Calls 1

filterResourceAttributesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…