Repository navigation
feat(telemetry): send error reports again, to a new Sentry project - #180
Open
dg-dayhaysoos wants to merge 1 commit into
Open
dg-dayhaysoos wants to merge 1 commit into
dg-dayhaysoos wants to merge 1 commit into
Conversation
dg has sent no telemetry since 0.4.1. This turns error reporting back on: one report per run, only for an unexpected error, built from the published field allowlist, sent to the `deepgram-cli` Sentry project. - The destination is built in. DEEPCTL_TELEMETRY_DSN can only replace it with a loopback sink; any other value, an empty one included, turns reporting off. - A source checkout never reports. dg reads its own install metadata: the metadata must come from an installer, describe the code that is running, and not be an editable install. - Nothing is sent before dg has said so. The first run at a terminal prints a one-time notice on stderr and sends nothing; reports start with the next run. A local sink and DEEPCTL_TELEMETRY=log don't wait for it. - A plugin command's path and flag names are left out of a report, like a plugin's module and function names already were. - Every existing opt-out still applies: --no-telemetry, DEEPCTL_TELEMETRY_DISABLED, DEEPCTL_TELEMETRY=off, DO_NOT_TRACK, CI and telemetry.enabled: false in the user config. Refs #179 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
dg-dayhaysoos
requested review from
GregHolmes,
deepgram-kiley and
dg-coreylweathers
as code owners
December 3, 2026 20:02
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dg has sent no telemetry since 0.4.1. This turns error reporting back on, sending to a new Sentry project (
deepgram-cli).A report is still one event per run, only for an unexpected error, built from the allowlist in
docs/telemetry.md. Nothing is sent when a command succeeds or for a usage error.What changes for users
--quiet, for help, without a terminal, or in an AI agent session, and those runs don't count as shown. So an install that is only used from scripts, containers or agents never reports.--no-telemetry,DEEPCTL_TELEMETRY_DISABLED,DEEPCTL_TELEMETRY=off,DO_NOT_TRACK,CI, andtelemetry.enabled: falsein the user config. Someone who has opted out never sees the notice.Safeguards
DEEPCTL_TELEMETRY_DSNcan only replace it with a loopback sink; any other value, an empty one included, turns reporting off. A test checks the DSN's shape and that it is the only Sentry address in shipped source.uv sync,pip install -e .and a checkout onPYTHONPATHall send nothing.telemetry/notice-shown), under the same ownership rules as the help cache. If it can't be read or written, nothing is sent.conftest.pyand the workflows already pointDEEPCTL_TELEMETRY_DSNat a closed loopback port. Tests that remove it patch the SDK.Not covered
A checkout that is built and installed non-editably (
pip install .,uv tool install ., locally built wheels) reports as if it were the last release. #179 has the options.Testing
uv run pytest: the new and changed tests pass. Two tests intests/unit/test_stream_discipline.pyfail on my machine, and fail the same way onmain.ruff format --check,ruff checkandmypypass onsrc/ packages/*/src scripts/.test_config_opt_out_caps.pytests that fail the same way onmainwith PyYAML 6.0.4 and pass with the locked 6.0.3.🤖 Generated with Claude Code