chore(transactions): Add counter metric for unresolved sampling project#6081
Open
elramen wants to merge 1 commit into
Open
chore(transactions): Add counter metric for unresolved sampling project#6081elramen wants to merge 1 commit into
elramen wants to merge 1 commit into
Conversation
cf87e61 to
5eeb220
Compare
loewenheim
approved these changes
Jun 11, 2026
Dav1dde
approved these changes
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_nameto 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