You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(telemetry): a usage error records its error class, never the argument text, and counts as a failed command #2024
A usage error can send an argument value to the trace backend. Click's message, for example Got unexpected extra argument (<value>), goes into the span's error.message through the tracer's generic exception handling. #1996 removed cli.args and process.command_line, and this path is left.
Also, except click.ClickException in _delegate (src/devops_cli/main.py) never catches Typer 0.27's errors. Typer vendors its own Click, and typer._click.exceptions.UsageError is not a subclass of click.ClickException. So a usage error records no devops_cli_command_total with status error.
Evidence
Found while #1996 was built. Its task file names this follow-up.
Proposed remedy
Catch the vendored typer._click.exceptions.ClickException in _delegate, and record the error class and exit code on the span, never the message.
Keep Typer's own error output for the person. A test with an unexpected extra argument checks that no exported attribute holds the argument and that the error counter counts it.
Activity
dan-petty commentedon Oct 24, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate fixes an error in how usage errors are handled and reported.The issue affects how telemetry records usage errors but does not break core functionality.Fixing the error recording improves debugging and telemetry accuracy for users.The fix involves catching a specific exception type and adjusting error reporting logic.Both items deal with exceptions but the candidate focuses on usage errors and telemetry while item 1006 refactors exception classes and error handling.fix(telemetry): the command span holds no argument value, so a secret…
fix(telemetry): a usage error records its error class, never the argu…
fix(telemetry): a usage error records its error class, never the argu…
fix(telemetry): the profile span holds the command path and the argum…