Retrieve the current trace in Go SDK #6113
Unanswered
josephschorr
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm curious to know whether there is a way to retrieve, in the Go SDK, the current trace from the current context as a read-only copy, one that could (in theory) be serialized over the wire.
I'm investigating an idea of adding a parameter to our API to return the OTEL trace alongside the API result, to aid in debugging upstream performance issues. Ideally, there would be a way at the beginning of the API handler to enforce that the trace is recorded if an incoming parameter is set to
true
, and then to encode the OTEL trace of the API's execution from that point to be returned in the response.Beta Was this translation helpful? Give feedback.
All reactions