Skip to content

docs(dynamic sampling): Update DSC validation and reconstruction#18424

Open
elramen wants to merge 6 commits into
masterfrom
elramen/dsc-docs-spans-v2
Open

docs(dynamic sampling): Update DSC validation and reconstruction#18424
elramen wants to merge 6 commits into
masterfrom
elramen/dsc-docs-spans-v2

Conversation

@elramen

@elramen elramen commented Jun 16, 2026

Copy link
Copy Markdown
Member

DESCRIBE YOUR PR

Update docs to reflect actual behavior of DSC validation and reconstruction in Relay.

Fixes RELAY-258

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

EXTRA RESOURCES

@linear-code

linear-code Bot commented Jun 16, 2026

Copy link
Copy Markdown

RELAY-258

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Jun 17, 2026 9:51am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
sentry-docs Ignored Ignored Preview Jun 17, 2026 9:51am

Request Review

Comment thread develop-docs/application-architecture/dynamic-sampling/architecture.mdx Outdated
@elramen elramen requested a review from shellmayr June 16, 2026 12:08
Comment thread develop-docs/application-architecture/dynamic-sampling/architecture.mdx Outdated
@elramen elramen changed the title WIP docs(dynamic sampling): Update DSC validation and reconstruction Jun 16, 2026
Comment thread develop-docs/application-architecture/dynamic-sampling/architecture.mdx Outdated

@coolguyzone coolguyzone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@constantinius constantinius left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes make sense to me

1. **DSC originating from a project within the same organization**

3. **A dynamic sampling context originating in a project of a different organization or an unknown project**: DSCs originating in different organizations or unknown projects are discarded and Relay will re-compute a DSC based on the data of the payload and scoped to the current project. The computed dynamic sampling context is then used to apply the dynamic sampling rules.
- **Transactions and spans v2**: The DSC is treated as valid and the sampling rules from the root project are applied as described in the previous section.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't mention internal details like spans v2 in the documentation. Maybe just spans or standalone spans.


- **Transactions**: The DSC is reconstructed using event fields like `release`, `environment`, and `transaction`, and scoped to the transaction's project. If reconstruction fails, for example, due to the public key being missing, the DSC is removed and the item is guaranteed to be sampled.

- **Spans v2**: The spans are rejected - unless they are from the OTel integration, in which case a missing DSC is allowed and the sample rate is 100%.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, would just say spans or standalone spans.

We can also take out otel into a separate bullet point, in the implementation they are intermingled, but they don't need to be in a higher level documentation.

    - **OTel**:  [..]
    - **Spans** [..]

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.

5 participants