Skip to content

fix(telemetry): send a sub-command point for a group body run #5192

Closed

Description

@dan-petty

Problem Description

The histogram devops_cli_subcommand_duration_seconds gets no point when a command group runs its own body with no sub-command, such as devops ci or devops review. OTelTyper.command wraps each command in _execute_traced_cli_command (src/devops_cli/core/cli.py:281), which sends the point. OTelTyper.callback (src/devops_cli/core/cli.py:299) wraps a callback with invoke_without_command=True only in _report_devops_error, so the body of the group sends no point.

The golden signals of devops-cli.json (#4707) read this histogram, because it has the label status. So the latency, traffic and error share of these runs are not on the dashboard.

Reproduction Steps

  1. Count the calls of each command in 24 h from the command counter and from the histogram:
    round(sum by (command) (increase(devops_cli_command_total[24h]))) - on (command) round(histogram_count(sum by (command) (increase(devops_cli_subcommand_duration_seconds[24h]))))
  2. Read the result for ci and gh.

Expected vs Actual Behavior

Expected: each run of devops sends one point to devops_cli_subcommand_duration_seconds, with status ok or error, as each run sends one point to devops_cli_command_total. A group body names the group in command and sub_command, as a command with no group does today.

Actual (2026-11-12, 24 h): ci has 831 more calls in devops_cli_command_total (1,253) than in the histogram (425), and gh has 429 more. The other commands differ by 10 or less.

Environment Diagnostics

devops-cli at main 6ef4336. The cluster Prometheus, data from the OTLP receiver (#4684).

Logs, Traces, or Terminal Output

No error. The points are not sent.

Source: #4707

Activity

  1. added
    source/agent
    on Nov 12, 2026
  2. added
    type/bug
    scope/telemetry
    status/new
    value/medium
    effort/low
    on Nov 12, 2026
  3. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 12, 2026
  5. removed
    status/in-review
    on Nov 15, 2026
  6. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 12:41 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/telemetrysource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions