Skip to content

Commit

Permalink
Fix inject direct span.
Browse files Browse the repository at this point in the history
  • Loading branch information
rnburn committed Aug 19, 2019
1 parent 72b6195 commit f230812
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/dynamic_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ class DynamicTracer final : public opentracing::Tracer,
if (span_context != nullptr) {
return tracer_->Inject(span_context->context(), writer);
}
return opentracing::make_unexpected(
opentracing::invalid_span_context_error);
return tracer_->Inject(sc, writer);
}

opentracing::expected<void> Inject(
Expand All @@ -139,8 +138,7 @@ class DynamicTracer final : public opentracing::Tracer,
if (span_context != nullptr) {
return tracer_->Inject(span_context->context(), writer);
}
return opentracing::make_unexpected(
opentracing::invalid_span_context_error);
return tracer_->Inject(sc, writer);
}

opentracing::expected<void> Inject(
Expand All @@ -150,8 +148,7 @@ class DynamicTracer final : public opentracing::Tracer,
if (span_context != nullptr) {
return tracer_->Inject(span_context->context(), writer);
}
return opentracing::make_unexpected(
opentracing::invalid_span_context_error);
return tracer_->Inject(sc, writer);
}

opentracing::expected<void> Inject(
Expand All @@ -161,8 +158,7 @@ class DynamicTracer final : public opentracing::Tracer,
if (span_context != nullptr) {
return tracer_->Inject(span_context->context(), writer);
}
return opentracing::make_unexpected(
opentracing::invalid_span_context_error);
return tracer_->Inject(sc, writer);
}

opentracing::expected<std::unique_ptr<opentracing::SpanContext>> Extract(
Expand Down

0 comments on commit f230812

Please sign in to comment.