Skip to content

Add and enforce strict_trace_continuation options #1162

Closed as not planned
Closed as not planned

Description

@szokeasaurusrex

Add the configuration required by the strict trace continuation spec: ClientOptions::org_id: Option<OrganizationId> and ClientOptions::strict_trace_continuation: bool. The initial default is still to be decided; we may want to make it true rather than follow the current spec default of false. Add internal helper logic that resolves the SDK org ID from configured org_id, otherwise the DSN-derived org ID, otherwise missing, and implement the strict-continuation decision matrix where client options are available, likely in Transaction::new.

Reject continuation when both org IDs are present and differ, or when exactly one is present and strict_trace_continuation is true; otherwise continue. When rejecting continuation, ignore the incoming trace ID, parent span ID, sampling decision, and baggage, then create a head-of-trace DSC. Add tests for the chosen default, resolution order, and all spec examples, and add a changelog note that the new ClientOptions fields break exhaustive struct literals that do not use ..Default::default(). Related: #1016.

Activity

  1. added
    Feature
    Rust
    on Jun 11, 2026
  2. linear-code commented on Jun 11, 2026

    @linear-code
  3. szokeasaurusrex commented on Jun 25, 2026

    @szokeasaurusrex
    MemberAuthor

    closing in favor of #1199 (#1999)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRustTraces

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions