Open cedricziel opened 2 weeks ago
We actually used to have this, but it looks like it was consolidated into setParent
some time ago: https://github.com/open-telemetry/opentelemetry-php/pull/820/files
I think that setParent(false)
is the same thing, if that helps but could be better documented?
Is your feature request related to a problem? When batch-processing messages from a queue, it is not great to have all message spans related to the parent span, but rather be traces on their own.
In the Java instrumentation, there is a convenience builder method called
setNoParent
, which sets an empty context to create a fresh trace.Describe the solution you'd like Add a convenience method to the SpanBuilder to ease creation of parent-less spans.
Describe alternatives you've considered There's an unintuitive workaround which requires instrinsic knowledge about the SDK:
Additional context Add any other context about the feature request here.