---
title: "Send no telemetry from CI or when · Agent Wranglers"
url: https://agentwranglers.se/playbook/developer-tools/configuration-and-telemetry/cli-telemetry-off
id: DEV-15
level: Recommended
updated: 2026-10-27
build: a2a6bdfed830
tokens: 886
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Send no telemetry from CI or when DO_NOT_TRACK is set

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Configuration and telemetry](https://agentwranglers.se/playbook/developer-tools/configuration-and-telemetry.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: DEV-15
- Level: Recommended
- Chapter: [Configuration and telemetry](https://agentwranglers.se/playbook/developer-tools/configuration-and-telemetry.md)
- Rule: Send no usage data when `DO_NOT_TRACK=1`, when the tool's own variable such as `EXAMPLE_TELEMETRY=0` is set, or when `CI` is set. Before the first send, print what the tool collects and how to turn it off.
- Check: A test runs a command three times, once with each variable set. A network capture shows no request to the telemetry host. Without them, the first run prints the notice to standard error before any request. With the telemetry host unreachable, the command's run time grows by less than 1 second and its exit code is unchanged.
- How: Whether telemetry may start at all follows [Send usage data only after the user says yes](https://agentwranglers.se/playbook/desktop-apps/crashes-telemetry-and-accessibility/telemetry-opt-in.md). A command-line tool needs more, because it runs unattended. GitHub Actions sets `CI` to `true` on every run, and other CI services set it too. `DO_NOT_TRACK` is a variable many command-line tools share, so one setting silences them all. List every field you send in the docs. Offer `example telemetry status` and a flag that prints the payload instead of sending it. Send in the background with a 1 second time limit, and drop the data on any error, so telemetry never slows or fails a command.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
function telemetryAllowed(env = process.env, settings) {
  if (env.DO_NOT_TRACK === '1' || env.EXAMPLE_TELEMETRY === '0' || env.CI) return false
  return settings.telemetry === 'on'
}
```

### Python example

```python
import os

def telemetry_allowed(settings, env=os.environ) -> bool:
    if env.get("DO_NOT_TRACK") == "1" or env.get("EXAMPLE_TELEMETRY") == "0" or env.get("CI"):
        return False
    return settings.get("telemetry") == "on"
```

## Sources

- [GitHub Docs, default environment variables](https://docs.github.com/en/actions/reference/workflows-and-actions/variables)

## Related rules

- DSK-42 [Send usage data only after the user says yes](https://agentwranglers.se/playbook/desktop-apps/crashes-telemetry-and-accessibility/telemetry-opt-in.md) in Desktop apps and extensions

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/developer-tools/configuration-and-telemetry/cli-telemetry-off">Agent Wranglers developer tools, SDKs and CLIs playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Read settings in one documented order from standard folders](https://agentwranglers.se/playbook/developer-tools/configuration-and-telemetry/config-precedence.md)
- [Configuration and telemetry](https://agentwranglers.se/playbook/developer-tools/configuration-and-telemetry.md)
