Skip to content

feat(telemetry): centralized loki logql streamer, prometheus sparklines & trace waterfalls (tab-telemetry) #691

Description

@dan-petty

Context & Rationale

Unifies the complete observability triad directly within the terminal UI.

Scope & Deliverables

  • Context & Rationale*: Unifies the complete observability triad directly within the terminal UI.
  • Loki Centralized LogQL Query Console*: Embedded LogQL query input bar with syntax highlighting and live streaming log console, querying cluster-wide Fluent Bit / Loki logs without leaving the TUI.
  • Prometheus Performance Sparklines*: Terminal ASCII sparklines and gauges rendering real-time command execution latencies, LLM token throughput (tokens/sec), and cache hit ratios.
  • Trace Waterfall Modal*: Visual breakdown of recent OpenTelemetry distributed traces and multi-persona review spans with service latency waterfalls.

Update 2026-10-08: refinement

Fluent Bit is gone (#548); the console uses execute_logql_query (k8s/logql.py:413), and the waterfall reuses telemetry/waterfall.py, read from Tempo after #1135. The sparkline series exist (telemetry/instruments.py:71, :97; ai/spend/ledger.py:706); an embedding-cache ratio needs #817. Still no criteria, so not Ready.

Proposed design

Problem statement

The devops-cli project needs to implement a centralized observability dashboard within its terminal user interface (TUI) that integrates Loki log querying, Prometheus performance metrics visualization, and OpenTelemetry trace analysis.

Acceptance criteria

  • Criterion 1: A LogQL query console is embedded in the TUI with syntax highlighting and live streaming capabilities for querying cluster-wide logs from Fluent Bit or Loki without leaving the terminal interface.
    Verification: The terminal UI includes a LogQL input bar that supports syntax highlighting and live log streaming when executing queries against Loki.
  • Criterion 2: Terminal ASCII sparklines and gauges render real-time command execution latencies, LLM token throughput (tokens/sec), and cache hit ratios in the TUI.
    Verification: The terminal UI displays ASCII-based sparklines and gauges that update in real-time to show metrics like command execution times, LLM token rates, and cache performance.
  • Criterion 3: A trace waterfall modal visualizes recent OpenTelemetry distributed traces and multi-persona review spans with service latency waterfalls.
    Verification: The terminal UI contains a modal that displays trace data as a waterfall visualization showing service latencies and distributed trace relationships.

Key questions

  • What is the current state of Loki log querying functionality in the project?: Loki log querying uses an execute_logql_query function located at k8s/logql.py:413. This is already implemented and used in the cluster context command. [sources: src/devops_cli/k8s/logql.py:413]
  • What existing components are available for implementing Prometheus sparklines?: There are existing sparkline series implementations in telemetry/instruments.py at lines 71 and 97, as well as in ai/spend/ledger.py:706. An embedding-cache ratio needs to be implemented via feat(rag): embedding-cache hits and misses as counters #817. [sources: src/devops_cli/telemetry/instruments.py:71, src/devops_cli/telemetry/instruments.py:97, src/devops_cli/ai/spend/ledger.py:706]
  • How will the trace waterfall visualization be implemented?: The waterfall visualization reuses existing code from telemetry/waterfall.py and reads data from Tempo after issue feat(telemetry): traces are stored in tempo on a volume, and grafana and devops-cli read them, linked to logs and profiles #1135 is completed. [sources: src/devops_cli/telemetry/waterfall.py]
  • What is the timeline for this feature implementation?: This feature is planned for milestone v0.2.24 (Reactive Workstation Command Center, Interactive TUI & Unified Operations Hub). [sources: docs/ROADMAP.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added this to the v0.2.24 milestone on Sep 28, 2026
  2. added
    type/feature
    scope/telemetry
    priority/p1-high
    on Sep 28, 2026
  3. modified the milestones: v0.2.24, v0.2.25, v0.2.26 on Sep 30, 2026
  4. dan-petty commented on Sep 30, 2026

    @dan-petty
    OwnerAuthor

    Moved from v0.2.25 to v0.2.26. v0.2.25 is capped at 12 items (#740): it keeps #739-#742, their dependency #704, and the oldest P1 items. This P1 item is next in line.

  5. removed this from the v0.2.26 milestone on Oct 1, 2026
  6. dan-petty commented on Oct 1, 2026

    @dan-petty
    OwnerAuthor

    Moved from v0.2.26 to the backlog. After the v0.2.23 P1 leftovers were retargeted (they were committed earlier), v0.2.25 and v0.2.26 are full at 12 items each, and the roadmap-service items placed in v0.2.26 stay. It is next in line for a planned release.

  7. added
    priority/p2-medium
    and removed
    priority/p1-high
    on Oct 2, 2026
  8. dan-petty commented on Oct 2, 2026

    @dan-petty
    OwnerAuthor

    Grooming (2026-10-02): Priority p1-high → p2-medium, by the owner's decision. This is a feature with no defect behind it, and it is still a one-paragraph description with no acceptance criteria. That matches #685, the refined sibling tab, which is already P2. It stays in the backlog until it is refined.

  9. added this to the milestone on Oct 17, 2026
  10. dan-petty commented on Oct 18, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at 25e2cda (see proposed design in issue body).

  11. removed this from the milestone on Oct 23, 2026
  12. added 2 commits that reference this issue on Oct 25, 2026
    35d4e81
    9b2332f
  13. added a commit that references this issue on Oct 25, 2026
    5d368c8
  14. added a commit that references this issue on Oct 26, 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

    priority/p2-mediumscope/telemetrytype/feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions