Skip to content

feat(dashboards): Add a unified visualize list for trace metrics widgets - #131366

Open
edwardgou-sentry wants to merge 9 commits into
edwardgou-sentry/feat/trace-metric-row-modelfrom
edwardgou-sentry/feat/trace-metrics-unified-visualize
Open

edwardgou-sentry wants to merge 9 commits into
edwardgou-sentry/feat/trace-metric-row-modelfrom
edwardgou-sentry/feat/trace-metrics-unified-visualize

Conversation

@edwardgou-sentry

@edwardgou-sentry edwardgou-sentry commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Updates the widget viewer for trace metrics to allow querying for fields, aggregates, and equations within the same widget.
This change gets rid of the Series vs Equations mode for trace metric widgets, which only allowed users to exclusively render a single equation or several aggregates.

The trace metric row entries in the widget builder are managed by a TraceMetricRow from rowModel.ts in the groundwork pr:
#131366

We still continue to support building equations by referencing A, B, C letter form labels, and we also continue supporting the pattern of "hidden" aggregates by saving them inline with equations and parsing them out when opening in the widget builder.

Behind the dashboards-trace-metrics-unified-visualize flag.

image

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

✅ no issues found

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

No findings on the latest commit.

@edwardgou-sentry
edwardgou-sentry force-pushed the edwardgou-sentry/feat/trace-metrics-unified-visualize branch from 39538f4 to 7f17d76 Compare November 19, 2026 16:24
@edwardgou-sentry
edwardgou-sentry force-pushed the edwardgou-sentry/feat/trace-metrics-unified-visualize branch from 7f17d76 to 301eec7 Compare November 19, 2026 20:50
@edwardgou-sentry
edwardgou-sentry force-pushed the edwardgou-sentry/feat/trace-metrics-unified-visualize branch from 301eec7 to 3923a6e Compare November 20, 2026 15:16
@edwardgou-sentry
edwardgou-sentry changed the base branch from master to edwardgou-sentry/feat/trace-metric-row-model November 20, 2026 20:45
@edwardgou-sentry
edwardgou-sentry force-pushed the edwardgou-sentry/feat/trace-metrics-unified-visualize branch from 27802c5 to 2e3c38b Compare November 20, 2026 21:07
@edwardgou-sentry
edwardgou-sentry force-pushed the edwardgou-sentry/feat/trace-metrics-unified-visualize branch from 2e3c38b to d9a6fa5 Compare November 20, 2026 21:41
@edwardgou-sentry
edwardgou-sentry force-pushed the edwardgou-sentry/feat/trace-metrics-unified-visualize branch from d9a6fa5 to 9dae195 Compare November 20, 2026 21:59
Behind the dashboards-trace-metrics-unified-visualize flag: aggregates and equations share one list with row letters, per-row filters, and hide/show for rows only an equation uses.
Editing one duplicate no longer rewrites the equation, and repeated uses read back as distinct letters.
…nches

Keeps the legacy row where master has it, so the diff is only the new pieces.
Letters belong to rows, equations stay in letter form, and the old per-render derivation is gone.

Claude-Session: https://claude.ai/code/session_016ys9JvwtMgVv9brzjTEzNJ
@edwardgou-sentry
edwardgou-sentry force-pushed the edwardgou-sentry/feat/trace-metrics-unified-visualize branch from 9dae195 to 256f4d6 Compare November 20, 2026 22:09
@edwardgou-sentry
edwardgou-sentry marked this pull request as ready for review November 21, 2026 01:18
@edwardgou-sentry
edwardgou-sentry requested review from a team as code owners November 21, 2026 01:18
@edwardgou-sentry
edwardgou-sentry requested a review from a team November 21, 2026 01:18
@edwardgou-sentry

Copy link
Copy Markdown
Contributor Author

Tried to split out parts of this change into other PRs as much as possible. Still, some of the files in this pr have quite a lot of changes, and it might not be obvious what some of the code blocks are doing. Feel free to ping me if needed! 🙏

@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 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit eb79df8. Configure here.

commit(setRowVisible(rows, row.id, false));
}
},
show: row => commit(setRowVisible(rows, row.id, true)),

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.

Show bypasses the metrics cap

Medium Severity

hasMaxMetrics only counts visible fields, and show never checks that cap. A widget at MAX_METRICS_ALLOWED can still reveal a hidden series an equation uses, so the query goes over the 10-series limit Add Series and Add Equation already block.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit eb79df8. Configure here.

const row = visibleRows[index];
if (row) {
commit(setRowVisible(rows, row.id, false));
}

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.

Hide desyncs selected aggregate index

Medium Severity

Hiding a series removes it through SET_FIELDS / SET_Y_AXIS / SET_CATEGORICAL_AGGREGATE and never adjusts selectedAggregate. DELETE_AGGREGATE shifts or clears that index for Big Number and Categorical Bar radios, so hide can point the radio at the wrong remaining row or past the end of the list.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit eb79df8. Configure here.

This branch was successfully deployed

1 active deployment
Preview — eb79df81 Deployed Nov 21, 2026 by vercel[bot]
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.

1 participant