Skip to content

perf(dashboard): scan capacity metrics once and extract versions per resource - #322

Merged
vishr merged 1 commit into
mainfrom
perf/dashboard-panels
Oct 16, 2026
Merged

vishr merged 1 commit into
mainfrom
perf/dashboard-panels

Conversation

@vishr

@vishr vishr commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

On OpenTelemetry Demo data, the default System overview dashboard's hosts, containers and versions panels were close to, or over, the 10-second panel deadline when ingest was also running.

  • Hosts and containers. The shared raw CTE expanded into four Parquet scans per panel, so resource identity was decoded four times for every matching metric row. It is now MATERIALIZED and projects only the columns its consumers read. The plan has one metric scan.
  • Versions. Five resource fields were extracted from every span, log record and metric point in the window. Each signal now groups by namespace, service and resource, keeping the earliest event. The fields are then extracted once per distinct resource. The final grouping, minimum and order are unchanged.

No other panel, storage format, cache, deadline or engine setting changes.

Evidence

One-hour frozen window from a 2.2M-span OpenTelemetry Demo snapshot. Each panel ran in a fresh process: one cold run, then three warm runs.

Panel Cold ms Warm median ms
hosts 1,138 → 250 1,062 → 243
containers 1,123 → 238 1,003 → 240
versions 4,250 → 2,278 4,164 → 2,277

All frames match the previous SQL within 1e-12, which allows for floating-point aggregation order.

New tests cover:

  • first-seen times and runtime/SDK tuples;
  • capacity retries, cumulative resets and deltas;
  • namespaces and missing identities;
  • reporting and freshness boundaries.

Verification

  • go test ./internal/dashboard/... ./internal/panel/...: passed.
  • just check (pre-push): passed.
  • Codex adversarial review: no material findings.

…resource

The hosts and containers panels expanded their shared raw CTE into four
Parquet scans each, decoding resource identity for every matching metric row
four times. Materialize the CTE once and project only the columns its
consumers read. On a one-hour OpenTelemetry Demo snapshot the warm panel time
fell from 1,062 to 243 ms (hosts) and from 1,003 to 240 ms (containers).

The versions panel extracted five resource fields from every span, log record
and metric point in the window. Group each signal by namespace, service and
resource with its earliest event first, then extract the fields once per
distinct resource. First-seen times and runtime/SDK distinctions are
unchanged; warm time fell from 4,164 to 2,277 ms.

Frames match the previous SQL on the snapshot within 1e-12. New tests cover
first-seen and runtime/SDK tuples, capacity retries, cumulative resets,
deltas, namespaces, missing identities and freshness boundaries.

Claude-Session: https://claude.ai/code/session_01XA52nWyQ3R5f5kK8kjpAQW
@vishr
vishr force-pushed the perf/dashboard-panels branch from 2bb2945 to ec725eb Compare October 16, 2026 18:05
@vishr
vishr merged commit 0902483 into main Oct 16, 2026
22 of 23 checks passed
@vishr
vishr deleted the perf/dashboard-panels branch October 16, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant