feat(dashboards): Repair MCP dashboard widget filters#115543
Draft
gggritso wants to merge 2 commits into
Draft
Conversation
Replace `span.name:mcp.server` with `span.op:mcp.server` in every DashboardWidgetQuery.conditions value. A recent Relay change corrected the `name` of MCP spans, breaking the old filter. The prebuilt configs were already fixed in code, but widgets persisted from copies or hand- edited filters still carry the broken substring. Post-deployment, idempotent, scans only rows that contain the old substring. Refs DAIN-1673 Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
This PR has a migration; here is the generated SQL for for --
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL |
Add a TestMigrations case that covers the substring replacement: bare match, match alongside `has:` clauses, match embedded in a longer condition, rows already using `span.op:`, and unrelated rows. Refs DAIN-1673 Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Backend Test FailuresFailures on
|
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.
A consequence of getsentry/relay#5961 is that
span.nameof MCP server spans went from"mcp.server"(incorrect) to actual names like"tool/call whatever". Unfortunately this breaks any dashboards that were cloned from our pre-built ones. This adds a migration to repair people's dashboards.span.opis correctly"mcp.server"so that condition is safe. The prebuilt configs were fixed in #115540.There are ~100 of these widgets, so it's a fast migration.
References DAIN-1673.