Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

fix(dashboard): Correctly validate span and tracemetrics aggregates - #1295

Merged
BYK merged 2 commits into
mainfrom
seer/fix/cli-1cz-failure-rate-agg
Aug 1, 2026
Merged

BYK merged 2 commits into
mainfrom
seer/fix/cli-1cz-failure-rate-agg

Conversation

@sentry

@sentry sentry Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

This PR addresses two validation issues related to dashboard aggregate functions.

Initially, failure_rate was not recognized as a valid aggregate function for span-based widgets, leading to a ValidationError. The initial fix involved adding failure_rate to SPAN_AGGREGATE_FUNCTIONS.

During review, it was noted that this created a duplicate failure_rate entry in DISCOVER_AGGREGATE_FUNCTIONS (which extends SPAN_AGGREGATE_FUNCTIONS and also explicitly lists failure_rate). To resolve this, failure_rate has been removed from SPAN_AGGREGATE_FUNCTIONS, as it is already correctly handled by DISCOVER_AGGREGATE_FUNCTIONS where it is explicitly defined.

Additionally, this PR fixes a ValidationError for tracemetrics aggregates that use the equation| prefix. The isTracemetricsAggregate function was updated to correctly identify and validate these formula-based aggregates, preventing them from being incorrectly flagged as invalid.

This ensures that both failure_rate is correctly validated for spans and equation| prefixed aggregates are accepted for tracemetrics datasets.

Fixes CLI-1CZ

Comment @sentry <feedback> on this PR to have Autofix iterate on the changes.

@github-actions

github-actions Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-1295/

Built to branch gh-pages at 2026-08-01 10:40 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Codecov Results 📊

❌ Patch coverage is 50.00%. Project has 5457 uncovered lines.
✅ Project coverage is 81.59%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
src/types/dashboard.ts 50.00% ⚠️ 1 Missing and 1 partials
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

@sentry
sentry Bot marked this pull request as ready for review July 25, 2026 10:49

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread src/types/dashboard.ts Resolved
Comment thread src/types/dashboard.ts Resolved
Comment thread src/types/dashboard.ts Resolved
@BYK
BYK enabled auto-merge (squash) July 27, 2026 18:23
@sentry sentry Bot changed the title fix(dashboard): Allow failure_rate in span aggregate functions fix(dashboard): Correctly validate span and tracemetrics aggregates Jul 27, 2026
@sentry
sentry Bot force-pushed the seer/fix/cli-1cz-failure-rate-agg branch from a15146d to 2bc9150 Compare July 27, 2026 18:24
@BYK BYK added the jared Trigger the Jared agent to work on stuff label Jul 28, 2026
@BYK

BYK commented Aug 1, 2026

Copy link
Copy Markdown
Member

Jared get this merged

@jared-outpost
jared-outpost Bot force-pushed the seer/fix/cli-1cz-failure-rate-agg branch from 2bc9150 to b866d94 Compare August 1, 2026 10:39
@jared-outpost

jared-outpost Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

rebased onto main (the conflict was stale — dashboard.ts moved to packages/cli/src/ in the monorepo restructure, git relocated the change cleanly) and added a test covering the equation| tracemetrics case. lint/typecheck/dashboard tests pass locally. auto-merge is already enabled, so it'll squash-merge once the fresh CI goes green.

note: the earlier E2E failure was skill-eval.test.ts scoring 0 (flaky LLM eval), unrelated to this 4-line validation fix.

@BYK
BYK merged commit 807c863 into main Aug 1, 2026
31 checks passed
@BYK
BYK deleted the seer/fix/cli-1cz-failure-rate-agg branch August 1, 2026 10:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

jared Trigger the Jared agent to work on stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant