test(e2e): Migrate Express 4 and TSX to span streaming - #24156
Merged
Conversation
Contributor
size-limit report 📦
|
msonnb
marked this pull request as ready for review
September 7, 2026 12:51
msonnb
requested review from
a team,
andreiborza,
isaacs and
nicohrubec
and removed request for
a team
September 7, 2026 12:51
Co-Authored-By: GPT-6 <codex@openai.com>
msonnb
force-pushed
the
ms/express-4-tsx-span-streaming
branch
from
September 7, 2026 13:17
eadfc90 to
149bf8e
Compare
nicohrubec
reviewed
Sep 8, 2026
| expect(errorEvent.contexts?.trace?.trace_id).toBe(transactionTrace?.trace_id); | ||
| // The error is attached to the same trace as the request segment, and to a | ||
| // span in that segment. | ||
| const segmentTrace = segmentEvent; |
Member
There was a problem hiding this comment.
can we get rid of this alias?
| expect(transactionSpanIds).toContain(errorEvent.contexts?.trace?.span_id); | ||
| // The error is attached to the same trace as the request segment, and to a | ||
| // span in that segment. | ||
| const segmentTrace = segmentEvent; |
| import { waitForStreamedSpan, getSpanOp, collectStreamedSpansUntilSegment } from '@sentry-internal/test-utils'; | ||
|
|
||
| test('Sends an API route span', async ({ baseURL }) => { | ||
| const pageloadSegmentEventPromise = collectStreamedSpansUntilSegment( |
Member
There was a problem hiding this comment.
since this is an express app we probably don't have pageloads?
| }), | ||
| ); | ||
|
|
||
| expect(segmentEvent.attributes['http.response.status_code']?.value).toBe(200); |
Member
There was a problem hiding this comment.
this is already asserted above so seems redundant
| }), | ||
| ); | ||
|
|
||
| expect(segmentEvent.attributes['http.response.status_code']?.value).toBe(200); |
Member
There was a problem hiding this comment.
same here also redundant I think
Co-Authored-By: GPT-6 <codex@openai.com>
Member
Author
|
@nicohrubec addressed all in ec4b6bc |
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.
Exercise Express 4 and TSX instrumentation with span streaming, including error correlation, middleware, MCP, and tRPC coverage.
part of #23800