feat(tracemetrics): Add sum and count for gauge metrics - #122475
Merged
Conversation
nsdeschenes
approved these changes
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
force-pushed
the
feat/metrics/add-to-gauge
branch
from
August 24, 2026 20:05
9ed4d93 to
e9e87d0
Compare
k-fish
enabled auto-merge (squash)
August 24, 2026 20:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
sumandcountto the aggregate options for gauge metrics.Gauge was limited to
min/max/avgplus the rate aggregates in the UI. That was a product decision rather than a technical constraint — the backend aggregate definitions already validategaugeforsumandcount, so this only unhides them in the shared option lists (OPTIONS_BY_TYPEandGROUPED_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
sumorcountinstead of falling back to the gauge default ofavg, since both are valid gauge aggregates. That is covered by two new tests inmultiMetricsQueryParams.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