Skip to content

feat(telemetry): the devops-cli dashboard finds each sub-command from its series and repeats a panel for each #2700

Closed

Description

@dan-petty

Problem or Motivation

The devops-cli Telemetry dashboard (k8s/monitoring/dashboards/devops-cli.json) holds its command variable as a hand-kept custom list of 41 command groups. A new command group shows on the dashboard only after a person adds it to the list. The "Subcommand Latency Breakdown" row reads devops_cli_command_duration_seconds, which is the time of the whole command group, so no panel shows a sub-command such as devops config set.

devops_cli_subcommand_duration_seconds is sent for each sub-command, but its command label holds only the leaf name (set, list). The leaf names of different groups are the same, so the dashboard cannot tell config list from pr list, and no dashboard reads the series.

Proposed Solution & Architectural Design

  • OTelTyper sends devops_cli_subcommand_duration_seconds with the labels command (the command group, such as config), sub_command (the command path below devops, such as config set or pr threads reply) and status. Click's command_path gives both.
  • The dashboard gets its command variable from label_values(devops_cli_command_total, command), and a new multi-value sub_command variable with All from label_values(devops_cli_subcommand_duration_seconds{command=~"$command"}, sub_command). A new command or sub-command shows without a dashboard change.
  • The sub-command row has one calls panel by sub_command, and one latency panel (p50, p95, p99, mean, count) titled Telemetry: $sub_command that repeats for each selected sub_command.

Target Subsystem

Telemetry: src/devops_cli/core/cli.py, src/devops_cli/telemetry/instruments.py, k8s/monitoring/dashboards/devops-cli.json, docs/TELEMETRY.md.

Existing Tool Considered

Grafana query variables (label_values) and panel repeat. No new code is built: the change uses the Grafana features and the labels that Click gives.

The Grafana 13 Auto grid layout with a "query has data" show/hide rule needs the v2 dashboard schema. The sidecar loads the dashboards through the classic file provider, which refuses a plain v2 dashboard ("dashboard appears to be in v2 format", https://community.grafana.com/t/provisioning-in-grafana-13-with-v2-dashboards/163029). That part is a follow-up after a person confirms v2 file provisioning on the cluster.

Activity

  1. added
    enhancement
    on Oct 29, 2026
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

    enhancementtriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions