-
Notifications
You must be signed in to change notification settings - Fork 316
Conversation
Might be a little odd / asymmetric given the presence of |
The name does seem a bit long. I was wondering, is there any strong reason why Tracer isn't potentially a SpanOption? It could potentially be nice to have the same API across the board. |
Are there any objections to merge this? |
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.
is there any strong reason why Tracer isn't potentially a SpanOption?
Conceptually that feels off to me... StartSpan
is part of the Tracer
interface, so providing one as a SpanOption
param would be redundant.
I'm ok merging this. That said, gocontext.go
is in a conflict state, so that needs to be resolved first.
// It's behavior is identical to StartSpanFromContext except that it takes an explicit | ||
// tracer as opposed to using the global tracer. | ||
func StartSpanFromContextWithTracer(ctx context.Context, tracer Tracer, operationName string, opts ...StartSpanOption) (Span, context.Context) { | ||
var span Span |
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.
build fails because this statement is not needed
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.
@devoxel would you please fix it?
Originally discussed in #149 . This is a fairly simple PR. It just exports a helper function that already exists.
It can be useful for people not using the global tracer. It's only a small thing really, but still, could be nice.