Skip to content

Reproduction for sentry-javascript#18572#26

Open
andreiborza wants to merge 1 commit intomainfrom
repro/sentry-javascript-18572
Open

Reproduction for sentry-javascript#18572#26
andreiborza wants to merge 1 commit intomainfrom
repro/sentry-javascript-18572

Conversation

@andreiborza
Copy link
Member

Summary

Reproduction for getsentry/sentry-javascript#18572

OpenTelemetry context not propagating correctly when using @sentry/nestjs with custom OTel setup (skipOpenTelemetrySetup: true) and SentryContextManager. Traces randomly break into multiple partial traces under load, especially with gRPC endpoints.

Setup

  • NestJS hybrid app (HTTP + gRPC) matching the reporter's setup
  • Sentry + custom OTel SDK with SentryContextManager, SentryPropagator, SentrySpanProcessor
  • Custom sampler using wrapSamplingDecision (health-check filter)
  • ContextDebugSpanProcessor to log context propagation details
  • Test client that hammers endpoints concurrently to trigger context loss

How to run

cd sentry-javascript/18572
npm install
npx nest build
node dist/instrument.js
# In another terminal:
node dist/test-client.js

Check server logs for [CONTEXT-DEBUG] ORPHAN entries indicating broken context propagation.

Notes

  • The reporter could not reproduce locally; issue manifests in production under load
  • Regression introduced between v10.25.0 and v10.27.0
  • Suspected related to #18178 / PR #18239
  • Disabling Sentry entirely fixes the issue; removing tracesSampleRate/SentrySpanProcessor does not

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.

1 participant