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.
Not all requests need to trace, and for now, you have to mark these requests somehow to avoid new spans creation. Even if those spans will be skipped with the sampler.
Proposal
No need to create the new spans from context if there is no parent span.
Operation of the creation of root span is always explicit and made in middleware tracer.StartSpan(operationName, opts...) with the tracer object. And I await that if no parent in the context then it means that we don't have to trace it at all.
Besides this will allow not to use GlobalTracer() at all because we could be sure that it will be at the context in any case, and the global tracker could be completely removed as redundant.
Questions
What could be a reason to use StartSpanFromContext to create the root span?
Can we remove the * GlobalTracer* "singletons"? If it will really need to someone he can define it in his own module.
The text was updated successfully, but these errors were encountered:
demdxx
changed the title
No create the new spans from context if there is no parent span
Do not create the new spans from context if there is no parent span
Mar 17, 2019
Use Case
Not all requests need to trace, and for now, you have to mark these requests somehow to avoid new spans creation. Even if those spans will be skipped with the sampler.
Proposal
No need to create the new spans from context if there is no parent span.
Operation of the creation of root span is always explicit and made in middleware tracer.StartSpan(operationName, opts...) with the tracer object. And I await that if no parent in the context then it means that we don't have to trace it at all.
Besides this will allow not to use
GlobalTracer()at all because we could be sure that it will be at the context in any case, and the global tracker could be completely removed as redundant.Questions
StartSpanFromContext
to create the root span?The text was updated successfully, but these errors were encountered: