-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
tracing: clean up receivers #56045
tracing: clean up receivers #56045
Conversation
Release note: None
When `Span` and `Tracer` were exposed only via the `opentracing` interfaces, we weren't able to freely add methods to them, which led to a number of methods being added to the tracing package that took an `opentracing.Span` or `opentracing.Tracer` and internally unwrapped the underlying type. Now that we're not using these interfaces any more, we can be more idiomatic and put all methods on their proper receivers. This is done on this commit as a prelude to being more opinionated about our APIs. Release note: None
This is one of the immediate useful outcomes of moving off the `opentracing.Span` interface: we now get to decide what `(nil).Finish()` does, removing the need for workarounds. Release note: None
It was a testing crutch that is no longer necessary now that we've moved off the opentracing interfaces. Release note: None
b00e688
to
a0dc6a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, it's great that we can do this now!
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @irfansharif, @knz, and @tbg)
pkg/util/tracing/span.go, line 148 at r5 (raw file):
} // otSpan is an span for an external opentracing compatible tracer
[nit] a span
pkg/util/tracing/span.go, line 153 at r5 (raw file):
// shadowTr is the shadowTracer this span was created from. We need // to hold on to it separately because shadowSpan.Tracer() returns // the wrapper tracer directly and we lose the ability to find out
[nit] maybe remove "directly", I found it confusing
Release note: None
a0dc6a5
to
b25946e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TFTR!
bors r=RaduBerinde
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @irfansharif and @knz)
Build succeeded: |
Assorted cleanups that are possible now, that we have moved off the opentracing
interfaces.
There will be more cleanups.