Class DefaultSpan

Inheritance Relationships

Base Type

Class Documentation

class DefaultSpan : public opentelemetry::trace::Span

DefaultSpan provides a non-operational Span that propagates the tracer context by wrapping it inside the Span object.

Public Functions

inline virtual trace::SpanContext GetContext() const noexcept override
inline virtual bool IsRecording() const noexcept override
inline virtual void SetAttribute(nostd::string_view, const common::AttributeValue&) noexcept override
inline virtual void AddEvent(nostd::string_view) noexcept override
inline virtual void AddEvent(nostd::string_view, common::SystemTimestamp) noexcept override
inline virtual void AddEvent(nostd::string_view, const common::KeyValueIterable&) noexcept override
inline virtual void AddEvent(nostd::string_view, common::SystemTimestamp, const common::KeyValueIterable&) noexcept override
inline virtual void SetStatus(StatusCode, nostd::string_view) noexcept override
inline virtual void UpdateName(nostd::string_view) noexcept override
inline virtual void End(const EndSpanOptions&) noexcept override

Mark the end of the Span. Only the timing of the first End call for a given Span will be recorded, and implementations are free to ignore all further calls.

Parameters

options – can be used to manually define span properties like the end timestamp

inline nostd::string_view ToString() const noexcept
inline DefaultSpan(SpanContext span_context) noexcept
inline DefaultSpan(DefaultSpan &&spn) noexcept
inline DefaultSpan(const DefaultSpan &spn) noexcept

Public Static Functions

static inline DefaultSpan GetInvalid()