Add the Rust SDK configuration options required by the strict trace continuation spec: org_id and strict_trace_continuation. This task should expose the public API and resolve the SDK organization ID, but should not parse incoming baggage or enforce strict trace continuation yet. This is part of #1016 and replaces #1162 with a narrower, behavior-neutral API task.
Add API docs on the new fields and a CHANGELOG.md entry because this is a public API addition.
Implementation notes
Target files:
sentry-core/src/clientoptions.rs
CHANGELOG.md
Implementation:
- Add
pub org_id: Option<OrganizationId> to ClientOptions.
- Add
pub strict_trace_continuation: bool to ClientOptions.
- Set defaults:
org_id: None
strict_trace_continuation: false
- Include both fields in
ClientOptions debug output.
- Add an internal helper such as
pub(crate) fn resolved_org_id(&self) -> Option<OrganizationId>.
- Resolve the SDK organization ID by preferring explicit
org_id, then self.dsn.as_ref().and_then(Dsn::org_id).
- Document that
org_id is mainly needed for self-hosted Sentry and local Relay setups.
- Do not parse incoming baggage in this task.
- Do not enforce the strict continuation decision in this task.
- Do not create head-of-trace DSC in this task.
Tests:
- Explicit
org_id takes precedence over the DSN-derived organization ID.
- DSN-derived organization ID is used when explicit
org_id is absent.
- Missing or unparsable DSN organization ID returns
None.
- Defaults are
org_id: None and strict_trace_continuation: false.
- Validate with
cargo test -p sentry-core clientoptions.
Add the Rust SDK configuration options required by the strict trace continuation spec:
org_idandstrict_trace_continuation. This task should expose the public API and resolve the SDK organization ID, but should not parse incoming baggage or enforce strict trace continuation yet. This is part of #1016 and replaces #1162 with a narrower, behavior-neutral API task.Add API docs on the new fields and a
CHANGELOG.mdentry because this is a public API addition.Implementation notes
Target files:
sentry-core/src/clientoptions.rsCHANGELOG.mdImplementation:
pub org_id: Option<OrganizationId>toClientOptions.pub strict_trace_continuation: booltoClientOptions.org_id: Nonestrict_trace_continuation: falseClientOptionsdebug output.pub(crate) fn resolved_org_id(&self) -> Option<OrganizationId>.org_id, thenself.dsn.as_ref().and_then(Dsn::org_id).org_idis mainly needed for self-hosted Sentry and local Relay setups.Tests:
org_idtakes precedence over the DSN-derived organization ID.org_idis absent.None.org_id: Noneandstrict_trace_continuation: false.cargo test -p sentry-core clientoptions.