getTelemetryEnabledFromEnv checks only the environment variable, without the test detection bypass. This allows testing the env var logic.
()
| 29 | // getTelemetryEnabledFromEnv checks only the environment variable, |
| 30 | // without the test detection bypass. This allows testing the env var logic. |
| 31 | func 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. |
no outgoing calls