NVIDIA DeepStream SDK API Reference

9.2 Release
plugin::Tracer Class Referencefinal

Detailed Description

Definition at line 84 of file includes/opentelemetry/plugin/tracer.h.

Inheritance diagram for plugin::Tracer:
Collaboration diagram for plugin::Tracer:

Public Member Functions

 Tracer (std::shared_ptr< DynamicLibraryHandle > library_handle, std::unique_ptr< TracerHandle > &&tracer_handle) noexcept
 
nostd::shared_ptr< trace::Span > StartSpan (nostd::string_view name, const common::KeyValueIterable &attributes, const trace::SpanContextKeyValueIterable &links, const trace::StartSpanOptions &options={}) noexcept override
 
 Tracer (std::shared_ptr< DynamicLibraryHandle > library_handle, std::unique_ptr< TracerHandle > &&tracer_handle) noexcept
 
nostd::shared_ptr< trace::Span > StartSpan (nostd::string_view name, const common::KeyValueIterable &attributes, const trace::SpanContextKeyValueIterable &links, const trace::StartSpanOptions &options={}) noexcept override
 
nostd::shared_ptr< Span > StartSpan (nostd::string_view name, const StartSpanOptions &options={}) noexcept
 
template<class T , nostd::enable_if_t< common::detail::is_key_value_iterable< T >::value > * = nullptr>
nostd::shared_ptr< Span > StartSpan (nostd::string_view name, const T &attributes, const StartSpanOptions &options={}) noexcept
 
nostd::shared_ptr< Span > StartSpan (nostd::string_view name, const common::KeyValueIterable &attributes, const StartSpanOptions &options={}) noexcept
 
template<class T , class U , nostd::enable_if_t< common::detail::is_key_value_iterable< T >::value > * = nullptr, nostd::enable_if_t< detail::is_span_context_kv_iterable< U >::value > * = nullptr>
nostd::shared_ptr< Span > StartSpan (nostd::string_view name, const T &attributes, const U &links, const StartSpanOptions &options={}) noexcept
 
nostd::shared_ptr< Span > StartSpan (nostd::string_view name, std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >> attributes, const StartSpanOptions &options={}) noexcept
 
template<class T , nostd::enable_if_t< common::detail::is_key_value_iterable< T >::value > * = nullptr>
nostd::shared_ptr< Span > StartSpan (nostd::string_view name, const T &attributes, std::initializer_list< std::pair< SpanContext, std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >>>> links, const StartSpanOptions &options={}) noexcept
 
template<class T , nostd::enable_if_t< common::detail::is_key_value_iterable< T >::value > * = nullptr>
nostd::shared_ptr< Span > StartSpan (nostd::string_view name, std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >> attributes, const T &links, const StartSpanOptions &options={}) noexcept
 
nostd::shared_ptr< Span > StartSpan (nostd::string_view name, std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >> attributes, std::initializer_list< std::pair< SpanContext, std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >>>> links, const StartSpanOptions &options={}) noexcept
 

Static Public Member Functions

static Scope WithActiveSpan (nostd::shared_ptr< Span > &span) noexcept
 Set the active span. More...
 
static Scope WithActiveSpan (nostd::shared_ptr< Span > &span) noexcept
 Set the active span. More...
 
static nostd::shared_ptr< Span > GetCurrentSpan () noexcept
 Get the currently active span. More...
 
static nostd::shared_ptr< Span > GetCurrentSpan () noexcept
 Get the currently active span. More...
 

Constructor & Destructor Documentation

◆ Tracer() [1/2]

plugin::Tracer::Tracer ( std::shared_ptr< DynamicLibraryHandle >  library_handle,
std::unique_ptr< TracerHandle > &&  tracer_handle 
)
inlinenoexcept

Definition at line 87 of file includes/opentelemetry/plugin/tracer.h.

References absl::move().

◆ Tracer() [2/2]

plugin::Tracer::Tracer ( std::shared_ptr< DynamicLibraryHandle >  library_handle,
std::unique_ptr< TracerHandle > &&  tracer_handle 
)
inlinenoexcept

Definition at line 87 of file 9.2/includes/opentelemetry/plugin/tracer.h.

References absl::move().

Member Function Documentation

◆ GetCurrentSpan() [1/2]

static nostd::shared_ptr<Span> trace::Tracer::GetCurrentSpan ( )
inlinestaticnoexceptinherited

Get the currently active span.

Returns
the currently active span, or an invalid default span if no span is active.

Definition at line 153 of file includes/opentelemetry/trace/tracer.h.

References trace::SpanContext::GetInvalid(), context::RuntimeContext::GetValue(), nostd::holds_alternative(), and trace::kSpanKey.

◆ GetCurrentSpan() [2/2]

static nostd::shared_ptr<Span> trace::Tracer::GetCurrentSpan ( )
inlinestaticnoexceptinherited

Get the currently active span.

Returns
the currently active span, or an invalid default span if no span is active.

Definition at line 153 of file 9.2/includes/opentelemetry/trace/tracer.h.

References trace::SpanContext::GetInvalid(), context::RuntimeContext::GetValue(), nostd::holds_alternative(), and trace::kSpanKey.

◆ StartSpan() [1/10]

nostd::shared_ptr<Span> trace::Tracer::StartSpan ( nostd::string_view  name,
const common::KeyValueIterable &  attributes,
const StartSpanOptions &  options = {} 
)
inlinenoexceptinherited

Definition at line 59 of file includes/opentelemetry/trace/tracer.h.

◆ StartSpan() [2/10]

nostd::shared_ptr<trace::Span> plugin::Tracer::StartSpan ( nostd::string_view  name,
const common::KeyValueIterable &  attributes,
const trace::SpanContextKeyValueIterable &  links,
const trace::StartSpanOptions &  options = {} 
)
inlineoverridevirtualnoexcept

Implements trace::Tracer.

Definition at line 97 of file includes/opentelemetry/plugin/tracer.h.

◆ StartSpan() [3/10]

nostd::shared_ptr<trace::Span> plugin::Tracer::StartSpan ( nostd::string_view  name,
const common::KeyValueIterable &  attributes,
const trace::SpanContextKeyValueIterable &  links,
const trace::StartSpanOptions &  options = {} 
)
inlineoverridevirtualnoexcept

Implements trace::Tracer.

Definition at line 97 of file 9.2/includes/opentelemetry/plugin/tracer.h.

◆ StartSpan() [4/10]

nostd::shared_ptr<Span> trace::Tracer::StartSpan ( nostd::string_view  name,
const StartSpanOptions &  options = {} 
)
inlinenoexceptinherited

Definition at line 44 of file includes/opentelemetry/trace/tracer.h.

◆ StartSpan() [5/10]

template<class T , nostd::enable_if_t< common::detail::is_key_value_iterable< T >::value > * = nullptr>
nostd::shared_ptr<Span> trace::Tracer::StartSpan ( nostd::string_view  name,
const T &  attributes,
const StartSpanOptions &  options = {} 
)
inlinenoexceptinherited

Definition at line 52 of file includes/opentelemetry/trace/tracer.h.

◆ StartSpan() [6/10]

template<class T , class U , nostd::enable_if_t< common::detail::is_key_value_iterable< T >::value > * = nullptr, nostd::enable_if_t< detail::is_span_context_kv_iterable< U >::value > * = nullptr>
nostd::shared_ptr<Span> trace::Tracer::StartSpan ( nostd::string_view  name,
const T &  attributes,
const U &  links,
const StartSpanOptions &  options = {} 
)
inlinenoexceptinherited

Definition at line 70 of file includes/opentelemetry/trace/tracer.h.

◆ StartSpan() [7/10]

template<class T , nostd::enable_if_t< common::detail::is_key_value_iterable< T >::value > * = nullptr>
nostd::shared_ptr<Span> trace::Tracer::StartSpan ( nostd::string_view  name,
const T &  attributes,
std::initializer_list< std::pair< SpanContext, std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >>>>  links,
const StartSpanOptions &  options = {} 
)
inlinenoexceptinherited

Definition at line 90 of file includes/opentelemetry/trace/tracer.h.

◆ StartSpan() [8/10]

nostd::shared_ptr<Span> trace::Tracer::StartSpan ( nostd::string_view  name,
std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >>  attributes,
const StartSpanOptions &  options = {} 
)
inlinenoexceptinherited

Definition at line 79 of file includes/opentelemetry/trace/tracer.h.

◆ StartSpan() [9/10]

template<class T , nostd::enable_if_t< common::detail::is_key_value_iterable< T >::value > * = nullptr>
nostd::shared_ptr<Span> trace::Tracer::StartSpan ( nostd::string_view  name,
std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >>  attributes,
const T &  links,
const StartSpanOptions &  options = {} 
)
inlinenoexceptinherited

Definition at line 109 of file includes/opentelemetry/trace/tracer.h.

◆ StartSpan() [10/10]

nostd::shared_ptr<Span> trace::Tracer::StartSpan ( nostd::string_view  name,
std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >>  attributes,
std::initializer_list< std::pair< SpanContext, std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >>>>  links,
const StartSpanOptions &  options = {} 
)
inlinenoexceptinherited

Definition at line 121 of file includes/opentelemetry/trace/tracer.h.

◆ WithActiveSpan() [1/2]

static Scope trace::Tracer::WithActiveSpan ( nostd::shared_ptr< Span > &  span)
inlinestaticnoexceptinherited

Set the active span.

The span will remain active until the returned Scope object is destroyed.

Parameters
spanthe span that should be set as the new active span.
Returns
a Scope that controls how long the span will be active.

Definition at line 146 of file 9.2/includes/opentelemetry/trace/tracer.h.

◆ WithActiveSpan() [2/2]

static Scope trace::Tracer::WithActiveSpan ( nostd::shared_ptr< Span > &  span)
inlinestaticnoexceptinherited

Set the active span.

The span will remain active until the returned Scope object is destroyed.

Parameters
spanthe span that should be set as the new active span.
Returns
a Scope that controls how long the span will be active.

Definition at line 146 of file includes/opentelemetry/trace/tracer.h.


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