Skip to content

fix(performance): Restore feature parity on EAP Sampled Events tab#111731

Closed
mjq wants to merge 20 commits intomasterfrom
mjq/eap-sampled-events-papercuts
Closed

fix(performance): Restore feature parity on EAP Sampled Events tab#111731
mjq wants to merge 20 commits intomasterfrom
mjq/eap-sampled-events-papercuts

Conversation

@mjq
Copy link
Copy Markdown
Member

@mjq mjq commented Mar 27, 2026

This chunky PR brings the Transaction Summary > Sampled Events tab up to feature parity with the pre-EAP version (with a single exception).

What's fixed:

  • You can sort columns
  • Display of the Replay column is now conditional
  • The Trace ID is now a link to the trace waterfall
  • The HTTP method, user, and operation breakdown columns are back
  • You can now Open In Explore (like the old Open In Discover)
  • Filtering by percentile is back

What's different from the pre-EAP Sampled Events tab:

  • The span category filter is no longer on the page. I don't know what the behaviour is supposed to be because it was broken and inconsistent on the pre-EAP version. If we ever spec it out we can bring it back.

We're still split between switching on EAP conditionally inside components, and duplicating into new - all this goes away as soon as the GA for this is stable.

Each commit is pretty self-contained, if that helps for reviewing - if it's still too big I'm happy to break it up.

Fixes DAIN-1401.

@linear-code
Copy link
Copy Markdown

linear-code bot commented Mar 27, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 27, 2026
@mjq mjq changed the title Mjq/eap sampled events papercuts fix(performance): Restore feature parity on EAP Sampled Events tab Mar 27, 2026
Comment thread static/app/views/performance/eap/sampledEventsTable.tsx Outdated
cursor[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

mjq and others added 8 commits March 29, 2026 21:23
The SpanCategoryFilter dropdown on the sampled events tab had no
effect since the OverviewSpansTable does not consume the span.category
URL param. Remove it and adjust the grid layout so the search bar
fills the available space in the EAP path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace useSegmentSpansQuery with a direct useSpans call and define
inline fields, column types, and column order. This decouples the
overview events table from segmentSpansTable so each can evolve
independently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire up URL-based sort state for the OverviewSpansTable so that
span.duration and timestamp columns are sortable, matching the
non-EAP EventsTable behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Match the non-EAP behavior by only showing the Replay column when the
organization has the session-replay feature flag and the project
platform supports replays.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wrap the trace ID column in a link to the trace details view, matching
the existing behavior in the transaction events table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Display request.method as a column before duration in the overview
spans table, making it easier to distinguish between different HTTP
methods at a glance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Display user.display (derived from user.username, user.email, user.ip,
or user.id) as a column in the overview spans table.

Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
Move Span ID to the first column and Trace ID after Total Duration
for a more natural reading order: Span ID, User, HTTP Method,
Total Duration, Trace ID, Timestamp, Replay, Profile.

Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
cursor[bot]

This comment was marked as resolved.

mjq and others added 7 commits March 30, 2026 16:51
Add an "Open in Explore" button to the filter bar when the EAP
transaction summary is active, mirroring the "Open in Discover"
button shown for non-EAP. The button links to the Explore Traces
page preserving the current query, page filters, and sort.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable the Percentile filter (p50/p75/p95/p99/p100) for EAP mode,
which was previously hidden. Fetches percentile thresholds via useSpans
with p50(span.duration) through p100(span.duration), applies a
span.duration filter to the table and count queries, and carries the
filter into the Open in Explore URL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…down

The `otherPercentage` value could go negative due to floating-point
drift, producing an invalid negative CSS width. Use Math.max to clamp
it to zero.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename to match the UI label for this table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eventView.project is a number array. Using a template literal on the
whole array produces "1,2" with multiple projects, which never matches
any project ID. Use the first element instead, matching the pattern in
useEventViewProject.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…able

Passing an empty dateSelection to getTraceDetailsUrl caused the current
page's date filter params (statsPeriod, start, end) to be overwritten
with undefined. Use normalizeDateTimeParams to extract the date
selection from the URL query params instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mjq mjq force-pushed the mjq/eap-sampled-events-papercuts branch from 5a58382 to 75fe46e Compare March 31, 2026 15:53
@mjq
Copy link
Copy Markdown
Member Author

mjq commented Mar 31, 2026

@cursor review

@mjq
Copy link
Copy Markdown
Member Author

mjq commented Mar 31, 2026

@sentry review

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

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 1 potential issue.

Fix All in Cursor

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

pageFilters: selection,
},
'api.insights.segment-spans-table'
);
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.

Table queries fire without duration filter during loading

Low Severity

When a non-P100 percentile filter is active, useMaxDuration returns maxDuration: 0 while loading (because mapEAPPercentileValues([]) defaults all values to 0). Since 0 fails the maxDuration > 0 check, both the count and table useSpans queries fire immediately without any duration filter. When the percentile query completes, maxDuration updates and both queries re-fire with the correct filter — making the first pair of API calls wasted. Passing something like enabled: !isMaxDurationLoading to the table's useSpans calls (or returning undefined instead of 0 from mapEAPPercentileValues during loading) would prevent the unnecessary requests.

Additional Locations (1)
Fix in Cursor Fix in Web

@mjq
Copy link
Copy Markdown
Member Author

mjq commented Mar 31, 2026

This PR has gone through too many iterations (binary searching where my tsc OOM in CI was introduced, for one thing...). Now that I'm ready for review, starting again with a clean slate.

@mjq mjq closed this Mar 31, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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