fix(dashboard): Correctly validate span and tracemetrics aggregates#1295
Open
sentry[bot] wants to merge 1 commit into
Open
fix(dashboard): Correctly validate span and tracemetrics aggregates#1295sentry[bot] wants to merge 1 commit into
sentry[bot] wants to merge 1 commit into
Conversation
Contributor
|
Contributor
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 5497 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 81.75% 81.74% -0.01%
==========================================
Files 428 428 —
Lines 30106 30106 —
Branches 19593 19593 —
==========================================
+ Hits 24611 24609 -2
- Misses 5495 5497 +2
- Partials 2054 2055 +1Generated by Codecov Action |
Contributor
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.
BYK
reviewed
Jul 27, 2026
BYK
approved these changes
Jul 27, 2026
BYK
enabled auto-merge (squash)
July 27, 2026 18:23
sentry
Bot
force-pushed
the
seer/fix/cli-1cz-failure-rate-agg
branch
from
July 27, 2026 18:24
a15146d to
2bc9150
Compare
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.

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.