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
As discussed here - #2410, creating the issue to evaluate/discuss support for creating a root span when another span is active.
{
auto root1 = tracer->StartSpan("span 1");
auto root2 = trace->StartSpan("span 2");
auto token = tracer->WithActiveSpan(root1); // root 1 activeauto child_root1 = tracer->StartSpan("child of root1"); // child of root1
trace_api::StartSpanOptions options;
options.parent = root2;
auto child_root2 = tracer->StartSpan("child of root2", options); // child of root2// trying to create a span with no parent now.
options.parent = SpanContext(false, false);
auto root3 = tracer->StartSpan("root3", options); // root3 is child of root1 which is not desired
opentelemetry::context::Context c1;
options.parent = c1;
root3 = tracer->StartSpan("root3", options); // root3 is child of root1 which is not desired
trace_api::StartSpanOptions options2;
root3 = tracer->StartSpan("root3", options2); // root3 is child of root1 which is not desired
}
When one can create a span that is a child to a non-active span, should it also be possible to create a span with no parent?
The text was updated successfully, but these errors were encountered:
As discussed here - #2410, creating the issue to evaluate/discuss support for creating a root span when another span is active.
When one can create a span that is a child to a non-active span, should it also be possible to create a span with no parent?
The text was updated successfully, but these errors were encountered: