-
Notifications
You must be signed in to change notification settings - Fork 501
Closed
Description
I'm not using global contexts in my application. Instead I'm passing SpanContexts and creating children manually. My code has a lot of threads, and its easier to keep track of how everything is hooking up this way. This is all working extremely well until I need to propagate my latest span context. The Inject method in HttpTraceContext only takes a Context, which it immediately makes into a SpanContext.
void Inject(context::propagation::TextMapCarrier &carrier,
const context::Context &context) noexcept override
{
SpanContext span_context = trace::GetSpan(context)->GetContext();
if (!span_context.IsValid())
{
return;
}
InjectImpl(carrier, span_context);
}
- Would it be possible to supply a constructor that takes a SpanContext for those of us who are doing this more manually?
- Alternatively, is there a way to make a Context from a SpanContext. I couldn't find an easy way to do this
I know I can copy that file and change it to suit my needs, but ideally there would be a way around that. Thanks for any help.
Metadata
Metadata
Assignees
Labels
No labels