diff --git a/examples/plugin/plugin/tracer.cc b/examples/plugin/plugin/tracer.cc index 179f0cd099..7dd4958cb4 100644 --- a/examples/plugin/plugin/tracer.cc +++ b/examples/plugin/plugin/tracer.cc @@ -1,6 +1,7 @@ #include "tracer.h" #include +#include namespace nostd = opentelemetry::nostd; namespace common = opentelemetry::common; @@ -48,11 +49,13 @@ class Span final : public trace::Span bool IsRecording() const noexcept override { return true; } + trace::SpanContext GetContext() const noexcept { return span_->GetContext(); } // Tracer &tracer() const noexcept override { return *tracer_; } private: std::shared_ptr tracer_; std::string name_; + std::unique_ptr span_; }; } // namespace