Skip to content

chore(transactions): Add counter metric for unresolved sampling project#6081

Open
elramen wants to merge 1 commit into
masterfrom
elramen-dsc-metrics
Open

chore(transactions): Add counter metric for unresolved sampling project#6081
elramen wants to merge 1 commit into
masterfrom
elramen-dsc-metrics

Conversation

@elramen

@elramen elramen commented Jun 11, 2026

Copy link
Copy Markdown
Member

Add a counter metric for how often the trace root (sampling) project is unresolved, which happens when the trace root org is different from the spans currently being processed.

Reason for adding this metric: when the sampling project belongs to a different org than the spans, we need to re-synthesize the DSC to be able to apply dynamic sampling and to not share data across orgs. The idea is to use span attributes like sentry.segment_name to re-synthesize the DSC. But in v2 spans, there is no guarantee that all spans in an envelope have the same values for these attributes, so we can't re-synthesize the DSC. The solution would be to re-synthesize and apply dynamic sampling per span, but that's a bigger change. The added metric aims to help us determine if this would be worth it. In this PR, the metric is added for transaction spans because it gives us how big the problem could be (e.g. if customers currently sending transactions were to start sending v2 spans instead).

Ref INGEST-958

@elramen elramen force-pushed the elramen-dsc-metrics branch from cf87e61 to 5eeb220 Compare June 11, 2026 13:56
@linear-code

linear-code Bot commented Jun 11, 2026

Copy link
Copy Markdown

INGEST-958

@elramen elramen marked this pull request as ready for review June 11, 2026 13:58
@elramen elramen requested a review from a team as a code owner June 11, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants