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
Add a Dsn::org_id() helper so the SDK can derive its organization ID from SaaS DSNs as required by the strict trace continuation spec. This is the first implementation task in the strict trace continuation stack tracked by #1016.
The helper should parse SaaS-style hosts whose first DNS label is o<digits> and return None for self-hosted, Relay, malformed, or overflow cases. Add a CHANGELOG.md entry because this is a public API addition.
Implementation notes
Target files:
sentry-types/src/dsn.rs
sentry-types/src/protocol/v7.rs for the existing OrganizationId type
CHANGELOG.md
Implementation:
Add Dsn::org_id(&self) -> Option<OrganizationId>.
Parse only the first host label.
Accept labels matching o<digits>.
Return None for labels such as oabc, 123, empty labels, self-hosted hosts, Relay hosts, and integer overflow.
Examples:
o123.ingest.sentry.io -> Some(123.into())
o123.sentry.io -> None
sentry.io -> None
relay.example.com -> None
localhost -> None
oabc.ingest.sentry.io -> None
Tests:
Add unit tests in sentry-types/src/dsn.rs for valid SaaS hosts, malformed first labels, self-hosted hosts, and overflow.
Activity
linear-code commentedon Jun 11, 2026
RUST-233
feat(types): Add organization ID parsing for DSNs
feat(types): Add organization ID parsing for DSNs
feat(types): Add organization ID parsing for DSNs
feat(types): Add organization ID parsing for DSNs
feat(types): Add organization ID parsing for DSNs
feat(types): Add organization ID parsing for DSNs
feat(types): Add organization ID parsing for DSNs (#1202)