Class Tracer

Inheritance Relationships

Base Types

  • public opentelemetry::trace::Tracer (Class Tracer)

  • public std::enable_shared_from_this< Tracer >

Class Documentation

class Tracer : public opentelemetry::trace::Tracer, public std::enable_shared_from_this<Tracer>

Public Functions

explicit Tracer(std::shared_ptr<sdk::trace::TracerContext> context, std::unique_ptr<InstrumentationScope> instrumentation_scope = InstrumentationScope::Create("")) noexcept

Construct a new Tracer with the given context pipeline.

nostd::shared_ptr<trace_api::Span> StartSpan(nostd::string_view name, const opentelemetry::common::KeyValueIterable &attributes, const trace_api::SpanContextKeyValueIterable &links, const trace_api::StartSpanOptions &options = {}) noexcept override
void ForceFlushWithMicroseconds(uint64_t timeout) noexcept override
void CloseWithMicroseconds(uint64_t timeout) noexcept override
inline SpanProcessor &GetProcessor() noexcept

Returns the configured span processor.

inline IdGenerator &GetIdGenerator() const noexcept

Returns the configured Id generator

inline const InstrumentationScope &GetInstrumentationScope() const noexcept

Returns the associated instrumentation scope

inline const InstrumentationScope &GetInstrumentationLibrary() const noexcept
inline const opentelemetry::sdk::resource::Resource &GetResource()

Returns the currently configured resource

inline Sampler &GetSampler()