MCPcopy Index your code
hub / github.com/docker/docker-agent / getTelemetryEnabledFromEnv

Function getTelemetryEnabledFromEnv

pkg/telemetry/utils.go:31–38  ·  view source on GitHub ↗

getTelemetryEnabledFromEnv checks only the environment variable, without the test detection bypass. This allows testing the env var logic.

()

Source from the content-addressed store, hash-verified

29// getTelemetryEnabledFromEnv checks only the environment variable,
30// without the test detection bypass. This allows testing the env var logic.
31func getTelemetryEnabledFromEnv() bool {
32 if env := os.Getenv("TELEMETRY_ENABLED"); env != "" {
33 // Only disable if explicitly set to "false"
34 return env != "false"
35 }
36 // Default to true (telemetry enabled)
37 return true
38}
39
40// getUserUUID returns the persistent UUID identifying this cagent
41// installation, generating and persisting one on first use.

Callers 2

GetTelemetryEnabledFunction · 0.85

Calls

no outgoing calls

Tested by 1