Skip to content

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

Merged
mjq merged 28 commits intomasterfrom
mjq/eap-sampled-events-papercuts
Apr 7, 2026
Merged

fix(performance): Restore feature parity on EAP Sampled Events tab#111891
mjq merged 28 commits intomasterfrom
mjq/eap-sampled-events-papercuts

Conversation

@mjq
Copy link
Copy Markdown
Member

@mjq mjq commented Mar 31, 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 HTTP method and Replay column is now conditional
  • The Trace ID is now a link to the trace waterfall
  • 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.

After working through each item with Claude, the individual commits looked okay but everything taken together was pretty terrible - I went back and refactored it all back into (IMO) decent shape.

This PR got big, and is now borderline for reviewable size - I can definitely split it up if it's difficult to review in its current form.

Fixes DAIN-1401.

mjq and others added 21 commits March 31, 2026 11:56
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>
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>
@linear-code
Copy link
Copy Markdown

linear-code bot commented Mar 31, 2026

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

This comment was marked as resolved.

@mjq mjq marked this pull request as ready for review March 31, 2026 16:29
@mjq mjq requested review from a team as code owners March 31, 2026 16:29
Copy link
Copy Markdown
Member

@nikkikapadia nikkikapadia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some nits and questions

cursor[bot]

This comment was marked as resolved.

@mjq
Copy link
Copy Markdown
Member Author

mjq commented Apr 7, 2026

@nikkikapadia I think I've addressed all feedback - thanks for the thorough review!

@mjq mjq requested a review from nikkikapadia April 7, 2026 17:48
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.

Reviewed by Cursor Bugbot for commit 2833a05. Configure here.

Copy link
Copy Markdown
Member

@nikkikapadia nikkikapadia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@mjq mjq merged commit ade9321 into master Apr 7, 2026
68 checks passed
@mjq mjq deleted the mjq/eap-sampled-events-papercuts branch April 7, 2026 18:01
george-sentry pushed a commit that referenced this pull request Apr 9, 2026
…111891)

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 HTTP method and Replay column is now conditional
- The Trace ID is now a link to the trace waterfall
- 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.

After working through each item with Claude, the individual commits
looked okay but everything taken together was pretty terrible - I went
back and refactored it all back into (IMO) decent shape.

This PR got big, and is now borderline for reviewable size - I can
definitely split it up if it's difficult to review in its current form.

Fixes DAIN-1401.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants