Telemetry and data collection
Doc Detective collects basic anonymous telemetry to help the team understand product issues and usage. Telemetry is on by default, never sends personal or documentation content, and you can turn it off with a single config setting.
The notice you see
Each time you run Doc Detective, it prints a telemetry notice at the info log level.
When telemetry is on (the default):
When you turn telemetry off:
What Doc Detective collects
Each telemetry event records the command you ran (for example, runTests) and a set of anonymous environment properties:
For runTests commands, Doc Detective also sends a flattened summary of the run: pass and fail counts for specs, tests, and contexts. It sends result counts only, never the contents of your documentation, tests, URLs, or screenshots.
Doc Detective attributes each event to the identifier anonymous unless you set a userId (see Identify your runs), and sends telemetry to PostHog.
Turn telemetry off
To disable telemetry, set telemetry.send to false in your .doc-detective.json config file:
When telemetry.send is false, Doc Detective returns before it assembles or sends any telemetry data. For the full field reference, see Telemetry options.
Identify your runs
By default, telemetry events are anonymous. To attribute your runs to an organization, group, or individual, set telemetry.userId:
Override metadata with DOC_DETECTIVE_META
Distributions that wrap Doc Detective can identify themselves through the DOC_DETECTIVE_META environment variable. Set it to a JSON object whose fields seed the telemetry metadata, for example to record a custom deployment:
Doc Detective merges these values into the properties it collects. Any field you don’t set falls back to the value Doc Detective detects automatically. Setting DOC_DETECTIVE_META doesn’t enable telemetry on its own: if telemetry.send is false, Doc Detective sends nothing.