Skip to content

ref(spans): Use provided segment_id for buffering#97832

Merged
jan-auer merged 2 commits intomasterfrom
ref/spans-use-provided-segment-id
Aug 14, 2025
Merged

ref(spans): Use provided segment_id for buffering#97832
jan-auer merged 2 commits intomasterfrom
ref/spans-use-provided-segment-id

Conversation

@jan-auer
Copy link
Member

@jan-auer jan-auer commented Aug 14, 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%.

See also getsentry/sentry-kafka-schemas#433

@jan-auer jan-auer requested review from a team as code owners August 14, 2025 08:48
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 14, 2025
@jan-auer jan-auer merged commit b964a45 into master Aug 14, 2025
64 of 65 checks passed
@jan-auer jan-auer deleted the ref/spans-use-provided-segment-id branch August 14, 2025 11:18
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%.
@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants