Skip to content

Commit

Permalink
Merge pull request #16 from Tianlin-Zhao/origin/propagators
Browse files Browse the repository at this point in the history
tracer
  • Loading branch information
Tianlin-Zhao authored Aug 1, 2020
2 parents f388ac1 + 94834dd commit 5026789
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/include/opentelemetry/plugin/tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class Span final : public trace::Span

bool IsRecording() const noexcept override { return span_->IsRecording(); }

trace::SpanContext GetContext() { return span_->GetContext(); }

private:
std::shared_ptr<trace::Tracer> tracer_;
std::unique_ptr<trace::Span> span_;
Expand All @@ -72,8 +74,8 @@ class Tracer final : public trace::Tracer, public std::enable_shared_from_this<T
{
return nullptr;
}
return nostd::unique_ptr<trace::Span>{new (std::nothrow)
Span{this->shared_from_this(), std::move(span)}};
trace::Span* spn = new (std::nothrow)Span{this->shared_from_this(), std::move(span)};
return nostd::unique_ptr<trace::Span>{spn};
}

void ForceFlushWithMicroseconds(uint64_t timeout) noexcept override
Expand Down

0 comments on commit 5026789

Please sign in to comment.