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
Is your feature request related to a problem? Please describe.
I have code which is annotated with @WithSpan. Sometimes I want to have a method create a new root span, i.e. to have no parent.
Describe the solution you'd like
Add an attribute to @WithSpan such as noParent=true or type=root or equivalent. This feels similar to how one can set other builder options via the annotation such as being able to set the Span Kind.
Describe alternatives you've considered
I can do this by writing the necessary manual tracing code to create a Span with the setNoParent option on the builder, with all the attendant try/finally scope management, exception capture and remember to call .end() etc. Instead of a simple annotation it ends up taking 10 lines of boilerplate code. OTOH maybe this is a sufficiently rare situation that this is an OK tradeoff.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I have code which is annotated with @WithSpan. Sometimes I want to have a method create a new root span, i.e. to have no parent.
Describe the solution you'd like
Add an attribute to @WithSpan such as noParent=true or type=root or equivalent. This feels similar to how one can set other builder options via the annotation such as being able to set the Span Kind.
Describe alternatives you've considered
I can do this by writing the necessary manual tracing code to create a Span with the setNoParent option on the builder, with all the attendant try/finally scope management, exception capture and remember to call .end() etc. Instead of a simple annotation it ends up taking 10 lines of boilerplate code. OTOH maybe this is a sufficiently rare situation that this is an OK tradeoff.
The text was updated successfully, but these errors were encountered: