test(e2e): Port the React Router instrumentation API E2E app to span streaming - #23845
test(e2e): Port the React Router instrumentation API E2E app to span streaming#23845andreiborza wants to merge 2 commits into
Conversation
size-limit report 📦
|
2f982ae to
a9e6808
Compare
cf5c7f9 to
9e03698
Compare
9e03698 to
edd1076
Compare
…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.
Left the fetcher test on collectStreamedSpans: it already scopes children by walking down from the fetcher span, and whether that span is a segment under streaming is not something to assume.
edd1076 to
7d44686
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
|
|
||
| const transactionEvent = await transactionEventPromise; | ||
| const spans = transactionEvent.spans || []; | ||
| const spans = await spansPromise; |
There was a problem hiding this comment.
Child span collection can flake
Medium Severity
collectStreamedTrace is used without an isDone predicate in tests that then assert on child spans. That helper resolves as soon as the segment arrives, and streamed children can flush after it, so loader, middleware, redis, and mysql assertions can fail even when the spans are later sent. The same PR already waits for those children in collectUntilSegment, and the sibling react-router-7-framework tests do too. This is flagged because the review rules call out races when waiting on telemetry that can arrive in arbitrary order, including in lazy.server.test.ts.
Additional Locations (2)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 7d44686. Configure here.


What
Ports
react-router-7-framework-instrumentationto 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
spansarray, and the orchestrion mysql spec matches ondb.query.text, since a streamed mysql span is named after its query summary.Part of #23798