Skip to content

test(e2e): Port the React Router instrumentation API E2E app to span streaming - #23845

Merged
andreiborza merged 2 commits into
ab/js-3482/framework-appsfrom
ab/js-3482/instrumentation-api
Sep 2, 2026
Merged

test(e2e): Port the React Router instrumentation API E2E app to span streaming#23845
andreiborza merged 2 commits into
ab/js-3482/framework-appsfrom
ab/js-3482/instrumentation-api

Conversation

@andreiborza

@andreiborza andreiborza commented Sep 1, 2026

Copy link
Copy Markdown
Member

What

Ports react-router-7-framework-instrumentation to span streaming.

Why

Span streaming is the default now, so the E2E suite has to exercise it. Loader, action, middleware and fetcher assertions walk the streamed trace instead of a transaction's spans array, and the orchestrion mysql spec matches on db.query.text, since a streamed mysql span is named after its query summary.

Part of #23798

@linear-code

linear-code Bot commented Sep 1, 2026

Copy link
Copy Markdown

JS-3482

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.57 kB added added
@sentry/browser - with treeshaking flags 26.94 kB added added
@sentry/browser - with treeshaking flags tracing without tracing 26.83 kB added added
@sentry/browser (incl. Tracing) 48.87 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.88 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.8 kB added added
@sentry/browser (incl. Tracing, Replay) 88.36 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.76 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 93.05 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 106.02 kB added added
@sentry/browser (incl. Feedback) 46.06 kB added added
@sentry/browser (incl. sendFeedback) 33.64 kB added added
@sentry/browser (incl. FeedbackAsync) 38.74 kB added added
@sentry/browser (incl. Metrics) 29.52 kB added added
@sentry/browser (incl. Logs) 29.81 kB added added
@sentry/browser (incl. Metrics & Logs) 30.45 kB added added
@sentry/react 30.32 kB added added
@sentry/react (incl. Tracing) 51.08 kB added added
@sentry/vue 35.74 kB added added
@sentry/vue (incl. Tracing) 51.14 kB added added
@sentry/svelte 28.6 kB added added
CDN Bundle 30.36 kB added added
CDN Bundle (incl. Tracing) 49.52 kB added added
CDN Bundle (incl. Logs, Metrics) 32.59 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 51.43 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 73.19 kB added added
CDN Bundle (incl. Tracing, Replay) 87.01 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.88 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 92.94 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.84 kB added added
CDN Bundle - uncompressed 89.97 kB added added
CDN Bundle (incl. Tracing) - uncompressed 147.58 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.27 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 153.27 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.43 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.07 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 272.75 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 280.77 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 286.44 kB added added
@sentry/nextjs (client) 53.7 kB added added
@sentry/sveltekit (client) 49.3 kB added added
@sentry/core/server 40.74 kB added added
@sentry/core/browser 13.42 kB added added
@sentry/node 124.05 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.51 kB added added
@sentry/node - without tracing 88.3 kB added added
@sentry/node - without channel injection 103.35 kB added added
@sentry/aws-serverless 96.66 kB added added
@sentry/cloudflare (withSentry) - minified 201.23 kB added added
@sentry/cloudflare (withSentry) 500.94 kB added added

@andreiborza
andreiborza force-pushed the ab/js-3482/framework-apps branch from 75dab6a to ae51708 Compare September 1, 2026 14:21
@andreiborza
andreiborza force-pushed the ab/js-3482/instrumentation-api branch 2 times, most recently from 2f982ae to a9e6808 Compare September 1, 2026 14:56
@andreiborza
andreiborza force-pushed the ab/js-3482/framework-apps branch from ae51708 to 537187f Compare September 1, 2026 14:56
@andreiborza
andreiborza force-pushed the ab/js-3482/instrumentation-api branch 3 times, most recently from cf5c7f9 to 9e03698 Compare September 1, 2026 16:05
@andreiborza
andreiborza force-pushed the ab/js-3482/framework-apps branch from 47e95de to 5ecb95a Compare September 1, 2026 16:05
@andreiborza
andreiborza force-pushed the ab/js-3482/instrumentation-api branch from 9e03698 to edd1076 Compare September 1, 2026 16:37
@andreiborza
andreiborza force-pushed the ab/js-3482/instrumentation-api branch from edd1076 to 7d44686 Compare September 1, 2026 16:51
@andreiborza
andreiborza force-pushed the ab/js-3482/framework-apps branch from 54e87cd to adf8c96 Compare September 1, 2026 16:51

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 7d44686. Configure here.

@andreiborza
andreiborza force-pushed the ab/js-3482/framework-apps branch from adf8c96 to e2c7572 Compare September 2, 2026 08:23
@andreiborza
andreiborza force-pushed the ab/js-3482/instrumentation-api branch 2 times, most recently from d638522 to 979eaa0 Compare September 2, 2026 08:46
@andreiborza
andreiborza force-pushed the ab/js-3482/framework-apps branch from e2c7572 to 05a6dbd Compare September 2, 2026 08:46
@andreiborza
andreiborza force-pushed the ab/js-3482/instrumentation-api branch from 979eaa0 to 01f6e5d Compare September 2, 2026 09:05
@andreiborza
andreiborza force-pushed the ab/js-3482/framework-apps branch 2 times, most recently from 4736942 to 7700c10 Compare September 2, 2026 09:30
@andreiborza
andreiborza force-pushed the ab/js-3482/instrumentation-api branch from 01f6e5d to 9d1bbda Compare September 2, 2026 09:30
@andreiborza
andreiborza force-pushed the ab/js-3482/framework-apps branch from 7700c10 to 06f7731 Compare September 2, 2026 10:01
@andreiborza
andreiborza force-pushed the ab/js-3482/instrumentation-api branch from 9d1bbda to 1db63f1 Compare September 2, 2026 10:01
…streaming

Removes the `traceLifecycle: 'static'` pin from
`react-router-7-framework-instrumentation` and rewrites its specs against
streamed span v2.

Loader, action, middleware and fetcher assertions now walk the streamed trace
instead of a transaction's `spans` array. The orchestrion mysql spec matches on
`db.query.text`, since a streamed mysql span is named after its query summary.
@andreiborza
andreiborza force-pushed the ab/js-3482/framework-apps branch from 06f7731 to bd73839 Compare September 2, 2026 10:07
@andreiborza
andreiborza force-pushed the ab/js-3482/instrumentation-api branch from 1db63f1 to 107a1e4 Compare September 2, 2026 10:07
@andreiborza
andreiborza marked this pull request as ready for review September 2, 2026 11:42
'sentry.origin': { value: 'auto.db.redis', type: 'string' },
'db.system.name': { value: 'redis', type: 'string' },
'db.operation.name': { value: 'set', type: 'string' },
'db.query.text': { value: 'set test-key [1 other arguments]', type: 'string' },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

note for myself: #23741 needs to update these tests for the new span name. Let's merge your PR first. I'd actually appreciate more tests on the redis db span rename PR anyway!

Comment on lines +12 to +13
/** Every span below `rootSpan`, following `parent_span_id` down the tree. */
function descendantsOf(spans: SerializedStreamedSpan[], rootSpan: SerializedStreamedSpan): SerializedStreamedSpan[] {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

l: It took me quite a bit to understand this function. two suggestions:

  • can we call it getChildSpansOf - which is what I think this function does
  • rename rootSpan to parentSpan - because rootSpan is an overloaded term and I thought for a second this would be a segment span. but IIUC the fetcherSpan below is also just a child span and we want children of that span, correct?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Renamed the parameter to parentSpan as suggested, and went with getDescendantSpansOf rather than getChildSpansOf because the walk is transitive: it collects spans nested several levels below, not just direct children. And yes, the fetcher span is itself a child span, not a segment.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks, sounds good!

'code.function.name': 'lazy',
},
description: 'Lazy Route Load',
name: 'Lazy Route Load',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

side-comment: This is a bit of a weird span name and made me realize we don't yet have name/description rules for function spans 🙃 will add to #22350

`rootSpan` read as a segment span, which the fetcher span is not, and the name
did not say the walk is transitive.
@andreiborza
andreiborza merged commit 0424336 into ab/js-3482/framework-apps Sep 2, 2026
35 of 36 checks passed
@andreiborza
andreiborza deleted the ab/js-3482/instrumentation-api branch September 2, 2026 12:25
andreiborza added a commit that referenced this pull request Sep 2, 2026
…streaming (#23845)

## What

Ports `react-router-7-framework-instrumentation` to span streaming.

## Why

Span streaming is the default now, so the E2E suite has to exercise it.
Loader, action, middleware and fetcher assertions walk the streamed
trace instead of a transaction's `spans` array, and the orchestrion
mysql spec matches on `db.query.text`, since a streamed mysql span is
named after its query summary.

Part of #23798
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants