const opentelemetry::sdk::resource::Resource & GetResource() const noexcept
Obtain the resource associated with this tracer context.
SpanProcessor & GetProcessor() const noexcept
Obtain the configured (composite) processor.
opentelemetry::sdk::trace::IdGenerator & GetIdGenerator() const noexcept
Obtain the Id Generator associated with this tracer context.
Sampler & GetSampler() const noexcept
Obtain the sampler associated with this tracer.
bool Shutdown(std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept
Shutdown the span processor associated with this tracer provider.
A class which stores the TracerProvider context.
virtual ~TracerContext()=default
bool ForceFlush(std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept
Force all active SpanProcessors to flush any buffered spans within the given timeout.
void AddProcessor(std::unique_ptr< SpanProcessor > processor) noexcept
Attaches a span processor to list of configured processors to this tracer context.
const instrumentationscope::ScopeConfigurator< TracerConfig > & GetTracerConfigurator() const noexcept
Obtain the ScopeConfigurator with this tracer context.
TracerContext(std::vector< std::unique_ptr< SpanProcessor >> &&processor, const opentelemetry::sdk::resource::Resource &resource=opentelemetry::sdk::resource::Resource::Create({}), std::unique_ptr< Sampler > sampler=std::unique_ptr< AlwaysOnSampler >(new AlwaysOnSampler), std::unique_ptr< IdGenerator > id_generator=std::unique_ptr< IdGenerator >(new RandomIdGenerator()), std::unique_ptr< instrumentationscope::ScopeConfigurator< TracerConfig >> tracer_configurator=std::make_unique< instrumentationscope::ScopeConfigurator< TracerConfig >>(instrumentationscope::ScopeConfigurator< TracerConfig >::Builder(TracerConfig::Default()) .Build())) noexcept