fix(dashboard): Correctly validate span and tracemetrics aggregates - #1295
Conversation
|
Codecov Results 📊❌ Patch coverage is 50.00%. Project has 5457 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 81.58% 81.59% +0.01%
==========================================
Files 427 427 —
Lines 29634 29636 +2
Branches 19414 19416 +2
==========================================
+ Hits 24174 24179 +5
- Misses 5460 5457 -3
- Partials 2025 2025 —Generated by Codecov Action |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5b3fa1d. Configure here.
a15146d to
2bc9150
Compare
|
Jared get this merged |
2bc9150 to
b866d94
Compare
|
rebased onto main (the conflict was stale — note: the earlier E2E failure was |

This PR addresses two validation issues related to dashboard aggregate functions.
Initially,
failure_ratewas not recognized as a valid aggregate function for span-based widgets, leading to aValidationError. The initial fix involved addingfailure_ratetoSPAN_AGGREGATE_FUNCTIONS.During review, it was noted that this created a duplicate
failure_rateentry inDISCOVER_AGGREGATE_FUNCTIONS(which extendsSPAN_AGGREGATE_FUNCTIONSand also explicitly listsfailure_rate). To resolve this,failure_ratehas been removed fromSPAN_AGGREGATE_FUNCTIONS, as it is already correctly handled byDISCOVER_AGGREGATE_FUNCTIONSwhere it is explicitly defined.Additionally, this PR fixes a
ValidationErrorfortracemetricsaggregates that use theequation|prefix. TheisTracemetricsAggregatefunction was updated to correctly identify and validate these formula-based aggregates, preventing them from being incorrectly flagged as invalid.This ensures that both
failure_rateis correctly validated for spans andequation|prefixed aggregates are accepted fortracemetricsdatasets.Fixes CLI-1CZ
Comment
@sentry <feedback>on this PR to have Autofix iterate on the changes.