Skip to content

feat: Implement strict trace continuation (org_id validation)#1017

Draft
giortzisg wants to merge 2 commits intomasterfrom
feat/strict-trace-continuation
Draft

feat: Implement strict trace continuation (org_id validation)#1017
giortzisg wants to merge 2 commits intomasterfrom
feat/strict-trace-continuation

Conversation

@giortzisg
Copy link
Contributor

Description

Implement the strict_trace_continuation option as specified in the SDK spec.

This prevents unintended trace mixing across different Sentry organizations by validating the org_id in incoming baggage headers.

Changes:

  • Parse org_id from DSN host (e.g., o1234.ingest.sentry.io"1234")
  • Add org_id and strict_trace_continuation options to ClientOptions
  • Propagate org_id in Dynamic Sampling Context (DSC)
  • Add baggage header parsing for sentry-org_id
  • Validate org_id in continue_from_headers and OTel propagator
  • Add org_id() getter on DynamicSamplingContext

Issues

- Parse org_id from DSN host (e.g., o1234.ingest.sentry.io → "1234")
- Add `org_id` and `strict_trace_continuation` options to ClientOptions
- Propagate org_id in Dynamic Sampling Context (DSC)
- Add baggage header parsing for sentry-org_id
- Validate org_id in continue_from_headers and OTel propagator

Resolves #1016

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 27, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against c7ecd7a

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Implement strict trace continuation (org_id validation)

1 participant