A class which stores the TracerProvider context.
This class meets the following design criteria:
Definition at line 39 of file includes/opentelemetry/sdk/trace/tracer_context.h.
Public Member Functions | |
| 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 | |
| virtual | ~TracerContext ()=default |
| void | AddProcessor (std::unique_ptr< SpanProcessor > processor) noexcept |
| Attaches a span processor to list of configured processors to this tracer context. More... | |
| Sampler & | GetSampler () const noexcept |
| Obtain the sampler associated with this tracer. More... | |
| SpanProcessor & | GetProcessor () const noexcept |
| Obtain the configured (composite) processor. More... | |
| const opentelemetry::sdk::resource::Resource & | GetResource () const noexcept |
| Obtain the resource associated with this tracer context. More... | |
| const instrumentationscope::ScopeConfigurator< TracerConfig > & | GetTracerConfigurator () const noexcept |
| Obtain the ScopeConfigurator with this tracer context. More... | |
| opentelemetry::sdk::trace::IdGenerator & | GetIdGenerator () const noexcept |
| Obtain the Id Generator associated with this tracer context. More... | |
| bool | ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept |
| Force all active SpanProcessors to flush any buffered spans within the given timeout. More... | |
| bool | Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept |
| Shutdown the span processor associated with this tracer provider. More... | |
| 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 | |
| virtual | ~TracerContext ()=default |
| void | AddProcessor (std::unique_ptr< SpanProcessor > processor) noexcept |
| Attaches a span processor to list of configured processors to this tracer context. More... | |
| Sampler & | GetSampler () const noexcept |
| Obtain the sampler associated with this tracer. More... | |
| SpanProcessor & | GetProcessor () const noexcept |
| Obtain the configured (composite) processor. More... | |
| const opentelemetry::sdk::resource::Resource & | GetResource () const noexcept |
| Obtain the resource associated with this tracer context. More... | |
| const instrumentationscope::ScopeConfigurator< TracerConfig > & | GetTracerConfigurator () const noexcept |
| Obtain the ScopeConfigurator with this tracer context. More... | |
| opentelemetry::sdk::trace::IdGenerator & | GetIdGenerator () const noexcept |
| Obtain the Id Generator associated with this tracer context. More... | |
| bool | ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept |
| Force all active SpanProcessors to flush any buffered spans within the given timeout. More... | |
| bool | Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept |
| Shutdown the span processor associated with this tracer provider. More... | |
|
explicitnoexcept |
|
virtualdefault |
|
explicitnoexcept |
|
virtualdefault |
|
noexcept |
Attaches a span processor to list of configured processors to this tracer context.
Processor once attached can't be removed.
| processor | The new span processor for this tracer. This must not be a nullptr. Ownership is given to the TracerContext. |
Note: This method is not thread safe.
|
noexcept |
Attaches a span processor to list of configured processors to this tracer context.
Processor once attached can't be removed.
| processor | The new span processor for this tracer. This must not be a nullptr. Ownership is given to the TracerContext. |
Note: This method is not thread safe.
|
noexcept |
Force all active SpanProcessors to flush any buffered spans within the given timeout.
|
noexcept |
Force all active SpanProcessors to flush any buffered spans within the given timeout.
|
noexcept |
Obtain the Id Generator associated with this tracer context.
|
noexcept |
Obtain the Id Generator associated with this tracer context.
|
noexcept |
Obtain the configured (composite) processor.
Note: When more than one processor is active, this will return an "aggregate" processor
|
noexcept |
Obtain the configured (composite) processor.
Note: When more than one processor is active, this will return an "aggregate" processor
|
noexcept |
Obtain the resource associated with this tracer context.
|
noexcept |
Obtain the resource associated with this tracer context.
|
noexcept |
Obtain the sampler associated with this tracer.
|
noexcept |
Obtain the sampler associated with this tracer.
|
noexcept |
Obtain the ScopeConfigurator with this tracer context.
|
noexcept |
Obtain the ScopeConfigurator with this tracer context.
|
noexcept |
Shutdown the span processor associated with this tracer provider.
|
noexcept |
Shutdown the span processor associated with this tracer provider.