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 was 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?