Repository navigation
test(node): collect TypeSafe spans across streamed envelopes - #26151
Merged
Merged
Conversation
Co-Authored-By: OpenAI Codex <codex@openai.com>
nicohrubec
marked this pull request as ready for review
November 5, 2026 15:08
nicohrubec
requested review from
andreiborza,
isaacs and
mydea
and removed request for
a team
November 5, 2026 15:08
Contributor
size-limit report 📦Compared: 953fd61 (PR test merge using develop at eb0e92e) Against: eb0e92e (develop) · base run #65112 ✅ Baseline matches: this diff contains only this PR's changes.
|
andreiborza
approved these changes
Nov 6, 2026
43081j
pushed a commit
to 43081j/sentry-javascript
that referenced
this pull request
Nov 9, 2026
…ry#26151) **Why:** TypeSafe integration tests assume all four decide spans arrive in one streamed container. Collecting across envelopes removes that batching assumption while preserving every span assertion, including waiting for late children after the `main` segment. Not sure if this actually fixes it but worth a shot I have seen this flake couple of times. Co-authored-by: OpenAI Codex <codex@openai.com>
51 tasks done
s1gr1d
added a commit
that referenced
this pull request
Nov 17, 2026
…es (#26480) ❗ Use "Hide Whitespace" to only see around 50 LOC changed. ## What - Four `apollo-graphql/useOperationNameForRootSpan` tests and the Mastra multi-instance test collect the spans of a trace with `collectStreamedSpansUntilSegment`, and assert on the collected spans. - The `auto-flush` preload of the test runner registers its `beforeExit` handler with `once`. ## Why With span streaming, the SDK flushes 500 ms after any segment ends. The spans of one trace can then arrive in two envelopes. These tests asserted the whole trace on the first envelope and failed about 20 times in the last month when the trace was split. #26151 fixed the same pattern for the typesafe suite. Every assertion on names, attributes, origins, and status is unchanged. One difference: an error event that arrives before the first span envelope no longer fails these tests, because a collector reads span envelopes only. The `auto-flush` change is not a flake fix. `flush()` sets a timer, so `beforeExit` fired again after each flush and a finished scenario never exited. A test with an expectation that was not met waited for the full 15 s timeout; it now fails in about 3 s with "Scenario exited". Ref #26477
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.
Why: TypeSafe integration tests assume all four decide spans arrive in one streamed container. Collecting across envelopes removes that batching assumption while preserving every span assertion, including waiting for late children after the
mainsegment. Not sure if this actually fixes it but worth a shot I have seen this flake couple of times.