-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RoundTripper should work out of the box. #29
Comments
I don't recall the full interactions here, but I think ideally everything should work with just this:
And if instead the transport is created without a tracer, then the global one is used. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In following example:
nethttp.TraceRequest is extra. It is ok for people wanting greater control, but it should default to using GlobalTracer().
Similar to opencensus variant, ochttp, https:/census-instrumentation/opencensus-go/tree/master/plugin/ochttp, things work out of the box. Just using their server middleware and their roundtripper plus adding parent request headers to context (via
req = req.WithContext(parent.Context())
)However currently without
req, ht := nethttp.TraceRequest(tracer, req)
parent span isn't correlated to the child spanThe text was updated successfully, but these errors were encountered: