Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Port node-integration-tests to span streaming

Open
#24,130 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, typescript
Domain
testing-qa

Research direction

Start in dev-packages/node-integration-tests and compare suites against tracing/httpIntegration-streamed. Locate static and STREAMED traceLifecycle pins, then inspect transaction-envelope assertions and child-span collection in the affected suites. Done means the package uses span streaming throughout, streamed twins are folded back, assertions cover span v2, and tracing/sampling-static plus public-api/beforeSendSpan-static remain the static coverage.

Written by the indexing model from the issue text.

Description

javascript Task

Port dev-packages/node-integration-tests to span streaming. Span streaming is the default, so every suite that still pins traceLifecycle: 'static' covers behaviour we no longer ship.

Part of SDK-1425, one tracking issue per integration test package.

Scope

  • 299 traceLifecycle: 'static' pins across 188 suite directories
  • 111 suite directories assert on transaction envelopes and need a real rewrite
  • 19 suites already have a -streamed twin next to the static original
  • 20 suites use the env-gated traceLifecycle: process.env.STREAMED === 'true' ? 'stream' : 'static' pattern

How to port a suite

  1. Remove the traceLifecycle: 'static' pin from every Sentry.init in the suite.
  2. If a -streamed twin exists, fold it back: delete the static original and rename the twin to the base name. Do not keep both, or the coverage doubles and the two copies drift.
  3. If the suite uses the env-gated STREAMED switch, drop the switch and keep 'stream'.
  4. Rewrite the assertions from transaction envelopes to span v2:
    • .expect({ transaction }) becomes .expect({ span }), which gives a SerializedStreamedSpanContainer
    • event.transaction becomes span.name
    • contexts.trace.op becomes the sentry.op attribute plus span.is_segment
    • contexts.trace.data['x'] becomes span.attributes['x'], which has the shape { value, type }
    • transaction_info.source becomes the sentry.segment.name.source attribute
  5. Streamed child spans arrive across several envelopes, so collect across envelopes wherever a test asserts on children of a segment span.

Watch for span names that become low cardinality under streaming: http.server, http.client, db, cache, gen_ai and graphql. Those assertions change, not just the helper.

Reference suite: suites/tracing/httpIntegration-streamed.

Keep static trace lifecycle coverage

Do not add a -static copy per suite. tracing/sampling-static and public-api/beforeSendSpan-static already guard the static lifecycle for this package.

Dominant language
TypeScript
Stars
8.7k
Forks
1.9k
Avg merge
1d 18h
Merged PRs (30d)
543

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry-javascript

All issues in getsentry/sentry-javascript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.