41 ReferenceType reference_type,
43 utils::impl::SourceLocation source_location =
utils::impl::SourceLocation::Current()
53 ReferenceType reference_type = ReferenceType::kChild,
55 utils::impl::SourceLocation source_location =
utils::impl::SourceLocation::Current()
60 explicit Span(Span::Impl& impl);
63 Span(Span&& other)
noexcept;
67 Span& operator=(
const Span&) =
delete;
69 Span& operator=(Span&&) =
delete;
94 static Span
MakeSpan(std::string name, std::string_view trace_id, std::string_view parent_span_id);
105 MakeSpan(std::string name, std::string_view trace_id, std::string_view parent_span_id, std::string link);
123 Span CreateFollower(std::string name)
const;
159 void AddNonInheritableTags(
const logging::LogExtra&);
166 void AddEvent(std::string_view event_name);
212 std::string GetParentLink()
const;
222 const std::string& GetParentId()
const;
236 std::chrono::system_clock::time_point GetStartSystemTime()
const;
240 void AddTags(
const logging::LogExtra&,
utils::impl::InternalTag);
243 impl::TimeStorage& GetTimeStorage(
utils::impl::InternalTag);
246 void LogTo(
logging::impl::TagWriter writer)
const&;
250 struct OptionalDeleter {
251 void operator()(Impl*)
const noexcept;
253 static OptionalDeleter ShouldDelete()
noexcept;
255 static OptionalDeleter DoNotDelete()
noexcept;
258 explicit OptionalDeleter(
bool do_delete) : do_delete(do_delete) {}
260 const bool do_delete;
263 friend class SpanBuilder;
266 explicit Span(std::unique_ptr<Impl, OptionalDeleter>&& pimpl);
268 std::string GetTag(std::string_view tag)
const;
270 std::unique_ptr<Impl, OptionalDeleter> pimpl_;