Repository navigation
feat(tracing): Add span links - #8068
Open
pabloDeputter wants to merge 2 commits into
Open
pabloDeputter wants to merge 2 commits into
pabloDeputter wants to merge 2 commits into
Conversation
Contributor
Coverage Results 📊✅ 56441 passed | ⏭️ 2890 skipped | Total: 59331 | Pass Rate: 95.13% | Execution Time: 160m 21s 📊 Comparison with Base Branch
➖ Removed Tests (58)View removed tests
All tests are passing successfully. ✅ Patch coverage is 100.00% (27 of 27 changed executable lines covered; target 80%). Changed files with executable lines (2)
Coverage diff@@ Coverage Diff @@
## master #8068 +/-##
==========================================
- Coverage 90.25% 90.05% -0.20%
==========================================
Files 202 197 -5
Tracked lines 26660 21082 -5578
Branches 9926 7256 -2670
==========================================
- Hits 24062 18985 -5077
+ Misses 2598 2097 -501
+ Partials 1510 1235 -275Generated by Coverage Action |
pabloDeputter
marked this pull request as ready for review
October 20, 2026 11:27
This branch has not been deployed
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.
Description
Adds span links as is specified in the specs: a span can reference other spans, e.g. in other traces, without making them its parent.
sentry_sdk.start_span(..., links=[...]),span.add_link(link)andspan.add_links(links); with links being of the following format:{"trace_id", "span_id", "sampled"?, "attributes"?}linksNoOpSpanignores linksRelated docs update can be found here.
Why
An SQS/SNS consumer can receive a batch of records sent by several producers, each in its own trace. A span can only have one parent, so without links there's no way to connect the consumer each producer. With links the consumer span can point to each producer's trace.