[PoC] Support linking spans connected with Go chan#1727
Draft
MrAlias wants to merge 6 commits intoopen-telemetry:mainfrom
Draft
[PoC] Support linking spans connected with Go chan#1727MrAlias wants to merge 6 commits intoopen-telemetry:mainfrom
chan#1727MrAlias wants to merge 6 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1727 +/- ##
==========================================
+ Coverage 45.08% 45.09% +0.01%
==========================================
Files 339 341 +2
Lines 37298 37484 +186
==========================================
+ Hits 16814 16902 +88
- Misses 19423 19509 +86
- Partials 1061 1073 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This PoC adds Go span linking for work handed between goroutines through a
chan.When OBI observes a matched channel send/receive, it captures the active OBI trace context on the sending and receiving goroutines in eBPF space and emits a dedicated channel-link event. User-space holds that link until the corresponding OBI spans are decoded, then exports the resolved spans with OTLP span links.
What Changed
runtime.chansend1runtime.chanrecv1runtime.chanrecv2EVENT_GO_CHANNEL_LINKringbuf event for cross-goroutine handoffs.trace_id + span_id.examples/go-channel-linksusingdocker compose, local OBI build, and Grafana LGTM.Behavior
Given two separate goroutines with active OBI spans:
chanIn the example, this shows up as links between the OBI HTTP server spans for:
GET /dispatchGET /receiveKnown Limitations
runtime.chansend1runtime.chanrecv1runtime.chanrecv2select-based channel paths are not covered yet; those go throughruntime.selectgo<-workCh) for that reason