feat(trace-waterfall): Add "EAP JSON" debug button for superusers#116131
Draft
mjq wants to merge 25 commits into
Draft
feat(trace-waterfall): Add "EAP JSON" debug button for superusers#116131mjq wants to merge 25 commits into
mjq wants to merge 25 commits into
Conversation
This is no longer in use so time to remove it.
- When the flag is enabled, sets enable_frontend_code_search: true in seer chat request - The frontend code search needs to know the feature flags enabled for an org - so this PR adds a get_organization_features RPC endpoint that returns all active api_expose=True flags. Seer can call this on demand to validate what features are enabled in the user's Sentry frontend --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
…116101) Generated with claude ## Summary - The tracemetrics aggregate signature is `func(attribute, metric_name, metric_type, metric_unit)` — all four positional arguments are required (see `src/sentry/search/eap/trace_metrics/aggregates.py` and the validator in `src/sentry/search/eap/columns.py:776-795`). - The previous AI dashboard guidance only mentioned three arguments, so the agent emitted widgets like `avg(value, dashboards.widget_query_queue.time_to_empty, distribution)` and hit `Invalid parameter dashboards.widget_query_queue.time_to_empty. Must be one of ['', 'counter', 'gauge', 'distribution']`. - Why it fails: the resolver (`src/sentry/search/eap/resolver.py:1181-1188`) fills missing args from the front when defaults are available. With 3 args supplied, the empty default lands in the metric_name slot and the real metric_name shifts into the metric_type slot, tripping the literal validator. - Update both the on-page guidance (`TRACE_METRICS_GUIDANCE`) and the artifact schema field description (`GeneratedWidgetQuery.aggregates`) to spell out the 4-argument shape, require the agent to look up `metric_type` AND `metric_unit`, and document `-` as a fallback when only the unit is unknown. --------- Co-authored-by: Claude <noreply@anthropic.com>
When a customer goes to explore/<random-path>, the user sees a “The project you were looking for was not found.” error, which is a wrong behavior and error to show. This is because it tries to match an explore/* path, which isn't defined, and eventually matches the **legacyOrgRedirects** route, treating both params as :orgId/:projectId. This ticket adds a splat (*) path to the explore path and redirects users to the index explore component. Fixes EXP-959
I've added a `View related traces` link in the tooltip so that users can use heat maps to dig in to problem areas or general trends. The link should direct them to the traces page with the correct cross-event and page filters populated. Couple things to note here: 1. I think we're using a logarithmic y-axis scale so i might have to fix some of the link data 2. the tooltip renderer for e-charts does not accept react components (which is why i've done the hacks that i've done) Closes DAIN-1641 | Before | After | |--------|--------| | <img width="376" height="173" alt="image" src="https://github.com/user-attachments/assets/38e330c3-d894-4858-a833-d6c238acd242" /> | <img width="356" height="213" alt="image" src="https://github.com/user-attachments/assets/cfd475e3-c00c-4201-9082-0b11007a0e90" /> |
For unshared / unassigned issues, the actual response from the API for endpoints using the BaseGroupSerializerResponse was null. Type that correctly in the serializer Co-authored-by: Claude <noreply@anthropic.com>
…15973) Remove `/tests/spans/drop` from the `reset_snuba` test fixture so the matching Snuba PR can land cleanly. The standalone `spans` dataset/storage in Snuba is `readiness_state: deprecate` and is being removed in getsentry/snuba#7955. Without this change, every Snuba-backed Sentry test fails at setup because the removed dataset makes `/tests/spans/drop` return 404 and the fixture's `assert all(... status_code == 200 ...)` flips to false. This change should land **before or together with** the Snuba PR. Refs getsentry/snuba#7955 Agent transcript: https://claudescope.sentry.dev/share/sUX6tMR0k8BkW8MdTy2kMYcnEKXmBBWcPaOEkdpPmL8 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…gger (#116104) Fix editor dropdown placement, so the apply button is visible Before <img width="424" height="393" alt="image" src="https://github.com/user-attachments/assets/36cb7f3a-aac3-45eb-91d5-8ea623d61a54" /> After <img width="424" height="393" alt="image" src="https://github.com/user-attachments/assets/a92f0e97-a62b-41e4-bd0f-d54f57671453" /> Fixes DAIN-1677
) Stop click events from bubbling out of widget header action buttons (full-screen view, copy URL). On prebuilt dashboards like Web Vitals that wire a slideout drawer to the wrapper's `onClick`, the bubble caused the full-screen modal and the slideout drawer to open from a single click and overlap. **Root cause** The header buttons in `widgetFrame.tsx` didn't `e.stopPropagation()`, so a click on the expand icon fired the button's `onFullScreenViewClick` *and* bubbled up to `GridWidgetWrapper`'s `onClick` in `sortableWidget.tsx`, which opens the slideout. Same bubble exists for the Copy URL button and any single custom action. **Fix** Each header action button now stops propagation before invoking its handler. The wrapper's click target stays the widget body, so the slideout only opens when the user actually clicks into the widget body — not when they interact with a header button. Fixes DAIN-1684
The goal of this PR is to tweak the styles for the cross-event query section based off of the period selection. There are a couple issues currently when selecting an exact date range so this PR tweaks the styles based off of that condition.
…ays (#116099) For cross event queries in explore we only limit the user to making 7 day queries at a time. The only issue was we needed to have the ability to query a 7 day range within the `maxPickableDays` (of 90 days in this case) but there's no way to do that right now since `maxPickableDays` doesn't respect `maxDateRange`. Ideally if there's a `maxDateRange` the default time periods shown will be within that date range instead of just relying on `maxPickableDays`. I've only made changes to the logic if BOTH `maxPickableDays` and `maxDateRange` are passed in. I took a look to see if there are any other parts of the app that use `maxDateRange` and i don't see any references to it so this shouldn't cause odd behaviour on any other date selector :) Here's what it's looking like: https://github.com/user-attachments/assets/eedea627-5955-4c16-addf-f31c1cc0e4f2
…6105) propogate global filters in open in issues link For example: 1. If i have a transaction filter on the issues dataset <img width="854" height="411" alt="image" src="https://github.com/user-attachments/assets/9f58c282-53be-4ca5-a597-db3aa8f05795" /> 2. Clicking `open in issues` actually populates the query now <img width="1177" height="191" alt="image" src="https://github.com/user-attachments/assets/af79cc4c-7471-4ab3-b5df-0c58089f6bb0" />
Contributor
📊 Type Coverage Diff
🔍 1 new type safety issue introducedType assertions (
This is informational only and does not block the PR. |
…15805) Adds "Open in Explore" for metrics dashboard equation widgets. We only support a single equation in metrics widgets. Because of the type of widget queries and aggregates we need to loop over them, but there will only be one widget queries while the single equation condition holds. If the aggregate is an equation, it's parsed out into its subcomponents and the query that's saved on the `widgetQueries` is set on that equation.
…es (#116047) The RPC endpoint for tracemetrics doesn't take `equation[0]` as a valid sort and expects the full `equation|...` format. This PR ensures that when we make requests to the datasets with sorts (e.g. grouped series, or categorical bar charts) that the full equation is used. This is done by updating two surfaces: - Updating the series query params to treat `DiscoverDatasets.TRACEMETRICS` similar to spans and logs, which use RPC and have the same constraints/handling - Update the table request for categorical bar charts to detect if the sort is an equation alias, then get the index, get the equations, and use the right equation index to set the sort - Remove equation handling for the widget builder table sort because all datasets that support equations now support the full equation format. It's only the case that some datasets (RPC datasets) don't support the alias format This shouldn't require feature-flagging because it's gated on having the equation builder, which itself is feature flagged. I did a bunch of this PR manually and guided with claude before I realized there was a lot simpler of an implementation where we can internally use the `equation[0]` syntax for now and convert on the requests. At that point I prompted it to remove a bunch of the old cruft, rework the stuff that remained, and add tests.
Rejects widget create/update requests whose `(widget_type, display_type)` combination isn't allowed by the frontend Widget Builder's type selector (e.g. `table` on `tracemetrics`, `table` on `preprod-app-size`). Allowed combinations live in a new `DATASET_CONFIG` map keyed by `widget_type`. Adding the dataset configs also sets us up nicely for more per dataset validation For example, in the ui trace metrics don't support tables, so we shouldn't let them be saved as tables
…zation (#116129) Couple of things to note here. For heat maps we want to default to the largest interval because it shows the most patterns and then users can adjust how they'd like. There wasn't an option to use the largest interval so i added it in. I've also added tests for the `useChartInterval` hook. Test by changing the chart type in metrics to heat map and see the default interval change 🤩
## Summary - Removes the `organizations:data-browsing-widget-unfurl` and `organizations:dashboards-widget-unfurl` registrations from `src/sentry/features/temporary.py`. - Switches the Slack unfurl flag gates over to the base feature flags for each product (`organizations:visibility-explore-view` for explore, `organizations:dashboards-basic` for dashboards) in `explore.py`, `dashboards.py`, and `webhooks/event.py`. This keeps the existing "only unfurl when the org has the underlying product" guard while removing the unfurl-specific flags.
Fix TypeErrors related to UUID not being compatible with msgpack. Fixes SENTRY-5PTW
Fixes DAIN-1690 ## Problem Widget context menus (triggered by clicking the '...' buttons on dashboard widgets) were appearing behind the dashboard navigation sidebar because `theme.zIndex.dropdown` (1001) was lower than `theme.zIndex.sidebarPanel` (1019). Before <img width="297" alt="Screenshot 2026-05-25 at 1 06 18 PM" src="https://github.com/user-attachments/assets/814181dd-572a-4f2d-9679-3bdb57ed101d" /> After <img width="297" height="280" alt="Monosnap General Template copy 35 — sentry — Sentry 2026-05-25 13-53-18" src="https://github.com/user-attachments/assets/119b3eb7-3681-4aec-8e95-7063ea4d6641" /> ## Solution Updated `theme.zIndex.dropdown` from 1001 to 1020 (sidebarPanel + 1) in the theme definition. This ensures all dropdown menus across the application appear above the sidebar panel. Linear Issue: [DAIN-1690](https://linear.app/getsentry/issue/DAIN-1690/menu-appears-behind-dashboard-widget-actions) Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This enables the Add to Dashboard actions for equations and includes it in "All Application Metrics". This feature should be feature flagged
…int (#116145) We want to use medium everywhere, no need to expose this as a parameter.
Replace all usages of useAutofixData with useExplorerAutofix
27af911 to
24da847
Compare
Contributor
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
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.
In general, but especially during our span streaming rollout, it's useful for debugging to be able to see the underlying data for a particular span from EAP before it is transformed by the Sentry API and frontend. This PR adds a superuser-only button to the span details pane that, when clicked, opens the raw JSON result from EAP's TraceItemDetails RPC. (The endpoint also checks for superuser, of course 😄).
The button is modelled after the existing transaction JSON button, although the use case for this one is strictly internal. Since the JSON icon is already taken, I'm using the terminal icon to try to express "debugging". Suggestions welcome (but this is internal, so it doesn't matter too much.)
🤖: Claude Code (Opus 4.6) used to generate the code, with human editing + review. All words my own.