You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parse sentry-org_id from incoming baggage for transaction continuation #1200
Parse sentry-org_id from incoming baggage headers and store the parsed value on TransactionContext for later strict continuation decisions. This task should not enforce strict continuation yet and should not implement full Dynamic Sampling Context parsing or outgoing baggage propagation. This is part of #1016.
The goal is to make the incoming organization ID available to transaction creation while keeping the change behavior-neutral.
Implementation notes
Target file:
sentry-core/src/performance.rs
Implementation:
Add an internal parsed incoming trace metadata type, for example struct IncomingTrace { sentry_trace: SentryTrace, org_id: Option<OrganizationId> }.
Preserve public compatibility for parse_headers; either keep parse_headers returning Option<SentryTrace> and add a private parse_incoming_trace_headers, or add a distinct helper while leaving parse_headers unchanged.
Extend TransactionContext with an internal incoming_org_id: Option<OrganizationId> field.
Initialize incoming_org_id to None in constructors except continue_from_headers.
Update TransactionContext::continue_from_headers to parse both sentry-trace and baggage.
Parse baggage minimally:
scan comma-separated baggage members
trim whitespace around members
match only key sentry-org_id
parse the value as OrganizationId
treat malformed, empty, duplicate-unparseable, or absent values as None
Do not parse, preserve, or serialize any other DSC fields.
Tests:
baggage: sentry-org_id=123 is parsed.
Baggage with unrelated fields before or after sentry-org_id is parsed.
Mixed-case baggage header name is accepted.
Malformed org IDs are treated as absent.
No sentry-trace means the returned context starts a fresh trace and does not carry an incoming org ID.
Validate with cargo test -p sentry-core performance.
Activity
linear-code commentedon Jun 25, 2026
RUST-252
chore: Parse `org_id` from `baggage` header
chore: Parse `org_id` from `baggage` header
chore: Parse `org_id` from `baggage` header
chore: Parse `org_id` from `baggage` header
chore: Parse `org_id` from `baggage` header
chore(tracing): Store incoming baggage org ID
ref(core): Add trace propagation context
chore(tracing): Store incoming baggage org ID
ref(core): Add trace propagation context
chore(tracing): Store incoming baggage org ID
ref(core): Add trace propagation context
chore(tracing): Store incoming baggage org ID
ref(core): Add trace propagation context
chore(tracing): Store incoming baggage org ID
ref(core): Add trace propagation context
chore(tracing): Store incoming baggage org ID
ref(core): Add trace propagation context (#1212)
chore(tracing): Store incoming baggage org ID (#1209)