Skip to content

Is there a way to retrieve the "root" span of a Go context? #3457

Discussion options

You must be logged in to vote

No, there is no way to achieve this with the current API.
However, there is nothing preventing you from setting up your own HTTP handler running on top of the otel one which will store the HTTP span as a "main" one in the context and allow you to retrieve it afterwards.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by markhildreth-gravity
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants