Skip to content

feat(tracemetrics): Add sum and count for gauge metrics - #122475

Merged
k-fish merged 1 commit into
masterfrom
feat/metrics/add-to-gauge
Aug 24, 2026
Merged

feat(tracemetrics): Add sum and count for gauge metrics#122475
k-fish merged 1 commit into
masterfrom
feat/metrics/add-to-gauge

Conversation

@k-fish

@k-fish k-fish commented Aug 24, 2026

Copy link
Copy Markdown
Member

Adds sum and count to the aggregate options for gauge metrics.

Gauge was limited to min/max/avg plus the rate aggregates in the UI. That was a product decision rather than a technical constraint — the backend aggregate definitions already validate gauge for sum and count, so this only unhides them in the shared option lists (OPTIONS_BY_TYPE and GROUPED_OPTIONS_BY_TYPE), which cover the metrics aggregate dropdown, the dashboard widget builder, and the metric detector form.

One behaviour change falls out of this: switching a query from another metric type to a gauge metric now keeps a selected sum or count instead of falling back to the gauge default of avg, since both are valid gauge aggregates. That is covered by two new tests in multiMetricsQueryParams.spec.tsx. The existing aggregate compatibility tests keep their original assertions and now select a percentile, which gauge still does not support, so they continue to cover the fallback path.

Closes EXP-1152
Closes DAIN-1832

@k-fish
k-fish requested a review from a team as a code owner August 24, 2026 16:20
@linear-code

linear-code Bot commented Aug 24, 2026

Copy link
Copy Markdown

EXP-1152

DAIN-1832

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 24, 2026
Loosens the limit on gauge metric functions in the UI. Backend already accepts sum and count for the gauge type.

Refs EXP-1152
@k-fish
k-fish force-pushed the feat/metrics/add-to-gauge branch from 9ed4d93 to e9e87d0 Compare August 24, 2026 20:05
@k-fish
k-fish enabled auto-merge (squash) August 24, 2026 20:05
@k-fish
k-fish merged commit 5d3070f into master Aug 24, 2026
79 checks passed
@k-fish
k-fish deleted the feat/metrics/add-to-gauge branch August 24, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants