Skip to content

Commit

Permalink
tracer
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianlin-Zhao committed Aug 1, 2020
1 parent d22b43e commit 8c3d6fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/include/opentelemetry/plugin/detail/tracer_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class TracerHandle
{
public:
virtual ~TracerHandle() = default;

virtual trace::Tracer &tracer() const noexcept = 0;
};
} // namespace plugin
OPENTELEMETRY_END_NAMESPACE
2 changes: 2 additions & 0 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::Tracer &tracer() const noexcept override { return *tracer_; }

private:
std::shared_ptr<trace::Tracer> tracer_;
std::unique_ptr<trace::Span> span_;
Expand Down

0 comments on commit 8c3d6fd

Please sign in to comment.