Repository navigation
feat(cli): Apply saved dashboard transformations - #2110
Open
nsdeschenes wants to merge 3 commits into
Open
nsdeschenes wants to merge 3 commits into
nsdeschenes wants to merge 3 commits into
Conversation
Execute saved transformations through events-timeseries and retain complete responses. Print exact values, gaps, and provenance below the dashboard grid. Refs EXP-1410 Co-Authored-By: GPT-6.1 Sol (Codex) <[email protected]>
Expose --interval for chart requests and record the requested interval separately from the executed interval returned by Sentry. Refs EXP-1410 Co-Authored-By: GPT-6.1 Sol (Codex) <[email protected]>
Document supported widgets, complete transformed output, interval precedence, and explicit unsupported or unavailable results. Refs EXP-1410 Co-Authored-By: GPT-6.1 Sol (Codex) <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
Reviewed by Cursor Bugbot for commit 3aca1e4. Configure here.
nsdeschenes
marked this pull request as ready for review
November 9, 2026 15:25
nsdeschenes
added a commit
that referenced
this pull request
Nov 10, 2026
Dashboard inspection in the CLI and MCP now shows each widget query's saved transformations by aggregate position, in the order Sentry applies them. Duplicate aggregates stay separate entries, and widgets without saved transformations keep their current output. This only inspects configuration. Live execution is #2110 (EXP-1410). A shared helper in `@sentry/toolkit-core/dashboard-transformations` builds the entries for both products. It sorts positions numerically, keeps the transformation strings exactly as saved, keeps empty lists and positions that no longer match an aggregate, and writes a description such as `count() (aggregate 2): smooth(asap,7) → fill(zero)`. - **MCP `get_dashboard_details`**: each query gets `transformations: [{ aggregateIndex, aggregate, transformations, description }]`. The field is left out when nothing is saved (`{}`), so current responses don't change. It is `null` when the server's response has no `transformations` field (servers from before EXP-1299). - **CLI `dashboard view`**: adds a "Saved transformations" section under the grid, grouped by widget and query. - **CLI `dashboard widget edit`**: lists the saved transformations. It also fixes a gap: the command used to report the request widget, which leaves out transformations so Sentry keeps them. Now it reports the saved widget from the PUT response, so `--json` includes them too. - CLI JSON keeps the raw `transformations` map, which is keyed by aggregate position. Its schema field now has a description. I checked the contract against getsentry/sentry. `DashboardWidgetQuerySerializer` (in `api/serializers/models/dashboard.py`) always returns `obj.transformations or {}`. The write serializer only accepts canonical numeric indexes and checks `organizations:explore-interpolation-and-smoothing` on write. **Open question (feature-disabled):** the GET serializer doesn't check the feature flag. So an org with the feature off still gets its saved transformations back, and inspection shows them as saved. This PR doesn't fetch org features to label that case. If we want an explicit "saved but feature disabled" marker, that means an extra org lookup. Happy to add it if reviewers think it's worth it. Regression coverage uses the existing GET/PUT persistence mock (`widget/preservation.test.ts`), MCP handler tests against the dashboard fixture, and unit tests for the shared helper. Refs [EXP-1417](https://linear.app/getsentry/issue/EXP-1417/climcp-describe-saved-dashboard-transformations) <!-- junior-request-attribution:start --> via **Nick**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0CB5FY8Q9M%3A1794244820.905849 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AC0CB5FY8Q9M%3A1794244820.905849) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0CB5FY8Q9M%3A1794244820.905849/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Nicholas Deschenes <[email protected]> Co-authored-by: GPT-6.1 Sol <[email protected]>
Contributor
|
This PR has had no activity for 3 days. It closes in 2 days unless someone pushes, comments, or adds the |
This branch was previously deployed
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.

These changes make it so
sentry dashboard viewapply the transformations already saved on supported charts, such as filling gaps or smoothing values. It shows the exact results in tables and JSON, preserves gaps and information about which values were transformed, and honours the saved bucket interval unless you override it with--interval.🤖 generated description below:
Why
dashboard viewignored saved transformations and converted missing values to zero. Execute the saved transformations through the public time-series endpoint and retain the complete results.Fixes EXP-1410.
What changed
--intervaland expose requested and executed intervals separately.Scope
Saved dashboard chart transformations. Explore transformations and transformation editing controls are separate work.
Tradeoffs
Transformed widgets print complete tables below the dashboard grid. This keeps exact values and gaps that the existing stacked and downsampled charts cannot represent faithfully.
Verification
TZ=UTC pnpm run tscandTZ=UTC pnpm run lintpass.TZ=UTC pnpm run testpassed 12,972 CLI tests. The existing musl installer test fails on macOS, and the asset-catalog suite cannot find Xcode'sactool.