Skip to content

Commit

Permalink
resolving Null issue of span
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianlin-Zhao committed Aug 20, 2020
1 parent 9bb3984 commit 3eb1d6a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ class HttpTraceContext : public HTTPTextFormat<T>
void Inject(Setter setter, T &carrier, const context::Context &context) noexcept override
{
SpanContext span_context = SpanContext();
GetCurrentSpan(context, span_context) if (!span_context.IsValid()) { return; }
GetCurrentSpan(context, span_context);
if (!span_context.IsValid())
{
return;
}
InjectImpl(setter, carrier, span_context);
}

Expand Down

0 comments on commit 3eb1d6a

Please sign in to comment.