NVIDIA DeepStream SDK API Reference

9.2 Release
sdk::trace::SpanProcessor Class Referenceabstract

Detailed Description

Span processor allow hooks for span start and end method invocations.

Built-in span processors are responsible for batching and conversion of spans to exportable representation and passing batches to exporters.

Definition at line 29 of file includes/opentelemetry/sdk/trace/processor.h.

Inheritance diagram for sdk::trace::SpanProcessor:

Public Member Functions

virtual ~SpanProcessor ()=default
 
virtual std::unique_ptr< Recordable > MakeRecordable () noexcept=0
 Create a span recordable. More...
 
virtual void OnStart (Recordable &span, const opentelemetry::trace::SpanContext &parent_context) noexcept=0
 OnStart is called when a span is started. More...
 
virtual void OnEnd (std::unique_ptr< Recordable > &&span) noexcept=0
 OnEnd is called when a span is ended. More...
 
virtual bool ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
 Export all ended spans that have not yet been exported. More...
 
virtual bool Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
 Shut down the processor and do any cleanup required. More...
 
virtual ~SpanProcessor ()=default
 
virtual std::unique_ptr< Recordable > MakeRecordable () noexcept=0
 Create a span recordable. More...
 
virtual void OnStart (Recordable &span, const opentelemetry::trace::SpanContext &parent_context) noexcept=0
 OnStart is called when a span is started. More...
 
virtual void OnEnd (std::unique_ptr< Recordable > &&span) noexcept=0
 OnEnd is called when a span is ended. More...
 
virtual bool ForceFlush (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
 Export all ended spans that have not yet been exported. More...
 
virtual bool Shutdown (std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
 Shut down the processor and do any cleanup required. More...
 

Constructor & Destructor Documentation

◆ ~SpanProcessor() [1/2]

virtual sdk::trace::SpanProcessor::~SpanProcessor ( )
virtualdefault

◆ ~SpanProcessor() [2/2]

virtual sdk::trace::SpanProcessor::~SpanProcessor ( )
virtualdefault

Member Function Documentation

◆ ForceFlush() [1/2]

virtual bool sdk::trace::SpanProcessor::ForceFlush ( std::chrono::microseconds  timeout = (std::chrono::microseconds::max)())
pure virtualnoexcept

Export all ended spans that have not yet been exported.

Parameters
timeoutan optional timeout, the default timeout means that no timeout is applied.

Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.

◆ ForceFlush() [2/2]

virtual bool sdk::trace::SpanProcessor::ForceFlush ( std::chrono::microseconds  timeout = (std::chrono::microseconds::max)())
pure virtualnoexcept

Export all ended spans that have not yet been exported.

Parameters
timeoutan optional timeout, the default timeout means that no timeout is applied.

Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.

◆ MakeRecordable() [1/2]

virtual std::unique_ptr<Recordable> sdk::trace::SpanProcessor::MakeRecordable ( )
pure virtualnoexcept

Create a span recordable.

This requests a new span recordable from the associated exporter.

Returns
a newly initialized recordable

Note: This method must be callable from multiple threads.

Implemented in sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.

◆ MakeRecordable() [2/2]

virtual std::unique_ptr<Recordable> sdk::trace::SpanProcessor::MakeRecordable ( )
pure virtualnoexcept

Create a span recordable.

This requests a new span recordable from the associated exporter.

Returns
a newly initialized recordable

Note: This method must be callable from multiple threads.

Implemented in sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.

◆ OnEnd() [1/2]

virtual void sdk::trace::SpanProcessor::OnEnd ( std::unique_ptr< Recordable > &&  span)
pure virtualnoexcept

OnEnd is called when a span is ended.

Parameters
spana recordable for a span that was ended

Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.

◆ OnEnd() [2/2]

virtual void sdk::trace::SpanProcessor::OnEnd ( std::unique_ptr< Recordable > &&  span)
pure virtualnoexcept

OnEnd is called when a span is ended.

Parameters
spana recordable for a span that was ended

Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.

◆ OnStart() [1/2]

virtual void sdk::trace::SpanProcessor::OnStart ( Recordable &  span,
const opentelemetry::trace::SpanContext &  parent_context 
)
pure virtualnoexcept

OnStart is called when a span is started.

Parameters
spana recordable for a span that was just started
parent_contextThe parent context of the span that just started

Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.

◆ OnStart() [2/2]

virtual void sdk::trace::SpanProcessor::OnStart ( Recordable &  span,
const opentelemetry::trace::SpanContext &  parent_context 
)
pure virtualnoexcept

OnStart is called when a span is started.

Parameters
spana recordable for a span that was just started
parent_contextThe parent context of the span that just started

Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.

◆ Shutdown() [1/2]

virtual bool sdk::trace::SpanProcessor::Shutdown ( std::chrono::microseconds  timeout = (std::chrono::microseconds::max)())
pure virtualnoexcept

Shut down the processor and do any cleanup required.

Ended spans are exported before shutdown. After the call to Shutdown, subsequent calls to OnStart, OnEnd, ForceFlush or Shutdown will return immediately without doing anything.

Parameters
timeoutan optional timeout, the default timeout means that no timeout is applied.

Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.

◆ Shutdown() [2/2]

virtual bool sdk::trace::SpanProcessor::Shutdown ( std::chrono::microseconds  timeout = (std::chrono::microseconds::max)())
pure virtualnoexcept

Shut down the processor and do any cleanup required.

Ended spans are exported before shutdown. After the call to Shutdown, subsequent calls to OnStart, OnEnd, ForceFlush or Shutdown will return immediately without doing anything.

Parameters
timeoutan optional timeout, the default timeout means that no timeout is applied.

Implemented in sdk::trace::MultiSpanProcessor, sdk::trace::MultiSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::BatchSpanProcessor, sdk::trace::SimpleSpanProcessor, and sdk::trace::SimpleSpanProcessor.


The documentation for this class was generated from the following file: