ref(spans): Use provided segment_id for buffering#97832
Merged
Conversation
untitaker
approved these changes
Aug 14, 2025
priscilawebdev
pushed a commit
that referenced
this pull request
Aug 25, 2025
Now that the span buffer will be used in the ingestion pipeline, we can use the `segment_id` provided by Relay on most spans. This will guarantee correct output, since Relay takes the `segment_id` from the transaction event. For otel, the buffer still constructs span trees recursively via the `parent_id`. This particularly makes a difference for transactions/segments where some spans are disconnected from the tree. They will now be correctly assigned to the segment. Metrics on mismatches and the "original_segment_id" attribute are removed, since they will now always match if they are available. By definition, the match rate will be 100%.
andrewshie-sentry
pushed a commit
that referenced
this pull request
Aug 26, 2025
Now that the span buffer will be used in the ingestion pipeline, we can use the `segment_id` provided by Relay on most spans. This will guarantee correct output, since Relay takes the `segment_id` from the transaction event. For otel, the buffer still constructs span trees recursively via the `parent_id`. This particularly makes a difference for transactions/segments where some spans are disconnected from the tree. They will now be correctly assigned to the segment. Metrics on mismatches and the "original_segment_id" attribute are removed, since they will now always match if they are available. By definition, the match rate will be 100%.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Now that the span buffer will be used in the ingestion pipeline, we can
use the
segment_idprovided by Relay on most spans. This willguarantee correct output, since Relay takes the
segment_idfrom thetransaction event. For otel, the buffer still constructs span trees
recursively via the
parent_id.This particularly makes a difference for transactions/segments where
some spans are disconnected from the tree. They will now be correctly
assigned to the segment.
Metrics on mismatches and the "original_segment_id" attribute are
removed, since they will now always match if they are available. By
definition, the match rate will be 100%.
See also getsentry/sentry-kafka-schemas#433