You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 23, 2023. It is now read-only.
I'd however wish to start a FollowsFromRef from the parent context.
Problem
Using an option doesn't work since the ChildOf() option is appended last and hence takes precedence. Moreover the FollowsFrom() option requires a SpanContext which would be required to be extracted beforehand
// extra (boilerplate) work that would be needed each time varopts []StartSpanOptionifparentSpan:=SpanFromContext(parentCtx); parentSpan!=nil {
opts=append(opts, FollowsFrom(parentSpan.Context()))
}
// doesn't work either way since the `ChildOf` option takes precedence// and adds multiple conflicting references to the spanspan, ctx:=opentracing.StartSpanFromContext(parentCtx, "foo", opts...)
There is no matching function that can start a FollowsFrom span from context.
Proposal
This can be solved via either of two ways:
Add a new function StartFollowsFromSpanFromContext with similar semantics to StartSpanFromContextWithTracer but that creates a FollowsFromRef
or,
Add a StartSpanOption to signal StartSpanFromContextWithTracer to use a FollowsFrom instead of ChildOf
Questions to address (if any)
Which one of the solutions best fits the project semantics.
If opting for 1., adding a new function for follows from, is minimal code duplication from StartSpanFromContextWithTracer okay?
If opting for 2., adding a new option but reusing the same function StartSpanFromContext, the current documentation states that it builds a ChildOfRef - would that qualify as major version API change?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Use Case
Given a parent context, using the following code always results in
ChildOfRef
:I'd however wish to start a
FollowsFromRef
from the parent context.Problem
Using an option doesn't work since the
ChildOf()
option is appended last and hence takes precedence. Moreover theFollowsFrom()
option requires aSpanContext
which would be required to be extracted beforehandThere is no matching function that can start a
FollowsFrom
span from context.Proposal
This can be solved via either of two ways:
StartFollowsFromSpanFromContext
with similar semantics toStartSpanFromContextWithTracer
but that creates aFollowsFromRef
or,
StartSpanOption
to signalStartSpanFromContextWithTracer
to use aFollowsFrom
instead ofChildOf
Questions to address (if any)
1.
, adding a new function for follows from, is minimal code duplication fromStartSpanFromContextWithTracer
okay?2.
, adding a new option but reusing the same functionStartSpanFromContext
, the current documentation states that it builds aChildOfRef
- would that qualify as major version API change?The text was updated successfully, but these errors were encountered: