Repository navigation
feat(dashboards): Describe saved widget transformations - #2114
Draft
sentry-junior[bot] wants to merge 2 commits into
Draft
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
List each widget query's saved transformations by aggregate position in the CLI and MCP dashboard inspection output. Duplicate aggregates stay separate, and widgets without saved transformations keep their output. - MCP get_dashboard_details returns per-aggregate entries with the verbatim ordered transformations and a description. The field is omitted when none are saved and null when the server does not report transformations. - CLI dashboard view and dashboard widget edit describe the saved transformations. widget edit now reports the saved widget from Sentry's response, so its JSON keeps the transformations the request omits. Refs EXP-1417 Co-Authored-By: Nicholas Deschenes <nicholas.deschenes@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Report unavailable settings when a server omits transformations. Show explicitly saved empty transformation lists as none, and use transformation terminology consistently in docs and tests. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
This branch was successfully 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.
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-transformationsbuilds 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 ascount() (aggregate 2): smooth(asap,7) → fill(zero).get_dashboard_details: each query getstransformations: [{ aggregateIndex, aggregate, transformations, description }]. The field is left out when nothing is saved ({}), so current responses don't change. It isnullwhen the server's response has notransformationsfield (servers from before EXP-1299).dashboard view: adds a "Saved transformations" section under the grid, grouped by widget and query.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--jsonincludes them too.transformationsmap, which is keyed by aggregate position. Its schema field now has a description.I checked the contract against getsentry/sentry.
DashboardWidgetQuerySerializer(inapi/serializers/models/dashboard.py) always returnsobj.transformations or {}. The write serializer only accepts canonical numeric indexes and checksorganizations:explore-interpolation-and-smoothingon 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
via Nick.
--
View Session [Sentry]