NVIDIA DeepStream SDK API Reference

9.2 Release
common Namespace Reference

Namespaces

 detail
 

Data Structures

class  DurationUtil
 
class  KeyValueIterable
 Supports internal iteration over a collection of key-value pairs. More...
 
class  KeyValueIterableView
 Container for key-value pairs that can transform every value in it to one of types listed in common::AttributeValue. More...
 
class  KeyValueProperties
 
class  KeyValueStringTokenizer
 
struct  KeyValueStringTokenizerOptions
 
class  NoopKeyValueIterable
 Supports internal iteration over a collection of key-value pairs. More...
 
class  SpinLockMutex
 A Mutex which uses atomic flags and spin-locks instead of halting threads. More...
 
class  SteadyTimestamp
 A timepoint relative to the monotonic clock epoch. More...
 
class  StringUtil
 
class  SystemTimestamp
 A timepoint relative to the system clock epoch. More...
 
struct  Thread
 A simple thread, derived class overloads onThread() method. More...
 

Typedefs

using AttributeValue = nostd::variant< bool, int32_t, int64_t, uint32_t, double, const char *, nostd::string_view, nostd::span< const bool >, nostd::span< const int32_t >, nostd::span< const int64_t >, nostd::span< const uint32_t >, nostd::span< const double >, nostd::span< const nostd::string_view >, uint64_t, nostd::span< const uint64_t >, nostd::span< const uint8_t > >
 OpenTelemetry signals can be enriched by adding attributes. More...
 

Enumerations

enum  AttributeType {
  kTypeBool,
  kTypeInt,
  kTypeInt64,
  kTypeUInt,
  kTypeDouble,
  kTypeCString,
  kTypeString,
  kTypeSpanBool,
  kTypeSpanInt,
  kTypeSpanInt64,
  kTypeSpanUInt,
  kTypeSpanDouble,
  kTypeSpanString,
  kTypeUInt64,
  kTypeSpanUInt64,
  kTypeSpanByte,
  kTypeBool,
  kTypeInt,
  kTypeInt64,
  kTypeUInt,
  kTypeDouble,
  kTypeCString,
  kTypeString,
  kTypeSpanBool,
  kTypeSpanInt,
  kTypeSpanInt64,
  kTypeSpanUInt,
  kTypeSpanDouble,
  kTypeSpanString,
  kTypeUInt64,
  kTypeSpanUInt64,
  kTypeSpanByte
}
 
enum  AttributeType {
  kTypeBool,
  kTypeInt,
  kTypeInt64,
  kTypeUInt,
  kTypeDouble,
  kTypeCString,
  kTypeString,
  kTypeSpanBool,
  kTypeSpanInt,
  kTypeSpanInt64,
  kTypeSpanUInt,
  kTypeSpanDouble,
  kTypeSpanString,
  kTypeUInt64,
  kTypeSpanUInt64,
  kTypeSpanByte,
  kTypeBool,
  kTypeInt,
  kTypeInt64,
  kTypeUInt,
  kTypeDouble,
  kTypeCString,
  kTypeString,
  kTypeSpanBool,
  kTypeSpanInt,
  kTypeSpanInt64,
  kTypeSpanUInt,
  kTypeSpanDouble,
  kTypeSpanString,
  kTypeUInt64,
  kTypeSpanUInt64,
  kTypeSpanByte
}
 

Functions

template<class T , nostd::enable_if_t< detail::is_key_value_iterable< T >::value > * = nullptr>
KeyValueIterableView< T > MakeKeyValueIterableView (const T &container) noexcept
 
static nostd::span< const std::pair< nostd::string_view, common::AttributeValue > > MakeAttributes (std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >> attributes) noexcept
 Utility function to help to make a attribute view from initializer_list. More...
 
static nostd::span< const std::pair< nostd::string_view, common::AttributeValue > > MakeAttributes (nostd::span< const std::pair< nostd::string_view, common::AttributeValue >> attributes) noexcept
 Utility function to help to make a attribute view from a span. More...
 
static const common::KeyValueIterable & MakeAttributes (const common::KeyValueIterable &attributes) noexcept
 Utility function to help to make a attribute view from a KeyValueIterable. More...
 
template<class ArgumentType , nostd::enable_if_t< common::detail::is_key_value_iterable< ArgumentType >::value > * = nullptr>
static common::KeyValueIterableView< ArgumentType > MakeAttributes (const ArgumentType &attributes) noexcept
 Utility function to help to make a attribute view from a key-value iterable object. More...
 
static nostd::span< const std::pair< nostd::string_view, common::AttributeValue > > MakeAttributes (std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >> attributes) noexcept
 Utility function to help to make a attribute view from initializer_list. More...
 
static nostd::span< const std::pair< nostd::string_view, common::AttributeValue > > MakeAttributes (nostd::span< const std::pair< nostd::string_view, common::AttributeValue >> attributes) noexcept
 Utility function to help to make a attribute view from a span. More...
 
static const common::KeyValueIterable & MakeAttributes (const common::KeyValueIterable &attributes) noexcept
 Utility function to help to make a attribute view from a KeyValueIterable. More...
 
template<class ArgumentType , nostd::enable_if_t< common::detail::is_key_value_iterable< ArgumentType >::value > * = nullptr>
static common::KeyValueIterableView< ArgumentType > MakeAttributes (const ArgumentType &attributes) noexcept
 Utility function to help to make a attribute view from a key-value iterable object. More...
 

Variables

constexpr int SPINLOCK_FAST_ITERATIONS = 100
 
constexpr int SPINLOCK_SLEEP_MS = 1
 

Typedef Documentation

◆ AttributeValue

typedef nostd::variant< bool, int32_t, int64_t, uint32_t, double, const char *, nostd::string_view, nostd::span< const bool >, nostd::span< const int32_t >, nostd::span< const int64_t >, nostd::span< const uint32_t >, nostd::span< const double >, nostd::span< const nostd::string_view >, uint64_t, nostd::span< const uint64_t >, nostd::span< const uint8_t > > common::AttributeValue

OpenTelemetry signals can be enriched by adding attributes.

The AttributeValue type is defined as a variant of all attribute value types the OpenTelemetry C++ API supports.

The following attribute value types are supported by the OpenTelemetry specification:

  • Primitive types: string, boolean, double precision floating point (IEEE 754-1985) or signed 64 bit integer.
  • Homogenous arrays of primitive type values.
Warning
The OpenTelemetry C++ API does not support the following attribute: uint64_t, nostd::span<const uint64_t>, and nostd::span<const uint8_t> types.

The OpenTelemetry C++ API currently supports several attribute value types that are not covered by the OpenTelemetry specification:

  • uint64_t
  • nostd::span<const uint64_t>
  • nostd::span<const uint8_t>

Those types are reserved for future use and currently should not be used. There are no guarantees around how those values are handled by exporters.

Definition at line 58 of file includes/opentelemetry/common/attribute_value.h.

Enumeration Type Documentation

◆ AttributeType [1/2]

Enumerator
kTypeBool 
kTypeInt 
kTypeInt64 
kTypeUInt 
kTypeDouble 
kTypeCString 
kTypeString 
kTypeSpanBool 
kTypeSpanInt 
kTypeSpanInt64 
kTypeSpanUInt 
kTypeSpanDouble 
kTypeSpanString 
kTypeUInt64 
kTypeSpanUInt64 
kTypeSpanByte 
kTypeBool 
kTypeInt 
kTypeInt64 
kTypeUInt 
kTypeDouble 
kTypeCString 
kTypeString 
kTypeSpanBool 
kTypeSpanInt 
kTypeSpanInt64 
kTypeSpanUInt 
kTypeSpanDouble 
kTypeSpanString 
kTypeUInt64 
kTypeSpanUInt64 
kTypeSpanByte 

Definition at line 60 of file includes/opentelemetry/common/attribute_value.h.

◆ AttributeType [2/2]

Enumerator
kTypeBool 
kTypeInt 
kTypeInt64 
kTypeUInt 
kTypeDouble 
kTypeCString 
kTypeString 
kTypeSpanBool 
kTypeSpanInt 
kTypeSpanInt64 
kTypeSpanUInt 
kTypeSpanDouble 
kTypeSpanString 
kTypeUInt64 
kTypeSpanUInt64 
kTypeSpanByte 
kTypeBool 
kTypeInt 
kTypeInt64 
kTypeUInt 
kTypeDouble 
kTypeCString 
kTypeString 
kTypeSpanBool 
kTypeSpanInt 
kTypeSpanInt64 
kTypeSpanUInt 
kTypeSpanDouble 
kTypeSpanString 
kTypeUInt64 
kTypeSpanUInt64 
kTypeSpanByte 

Definition at line 60 of file 9.2/includes/opentelemetry/common/attribute_value.h.

Function Documentation

◆ MakeAttributes() [1/8]

template<class ArgumentType , nostd::enable_if_t< common::detail::is_key_value_iterable< ArgumentType >::value > * = nullptr>
static common::KeyValueIterableView<ArgumentType> common::MakeAttributes ( const ArgumentType &  attributes)
inlinestaticnoexcept

Utility function to help to make a attribute view from a key-value iterable object.

Template Parameters
ArgumentTypeExpected to be ArgumentType
Parameters
attributesThe key-value iterable object
Returns
nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>

Definition at line 140 of file includes/opentelemetry/common/key_value_iterable_view.h.

◆ MakeAttributes() [2/8]

template<class ArgumentType , nostd::enable_if_t< common::detail::is_key_value_iterable< ArgumentType >::value > * = nullptr>
static common::KeyValueIterableView<ArgumentType> common::MakeAttributes ( const ArgumentType &  attributes)
inlinestaticnoexcept

Utility function to help to make a attribute view from a key-value iterable object.

Template Parameters
ArgumentTypeExpected to be ArgumentType
Parameters
attributesThe key-value iterable object
Returns
nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>

Definition at line 140 of file 9.2/includes/opentelemetry/common/key_value_iterable_view.h.

◆ MakeAttributes() [3/8]

static const common::KeyValueIterable& common::MakeAttributes ( const common::KeyValueIterable &  attributes)
inlinestaticnoexcept

Utility function to help to make a attribute view from a KeyValueIterable.

Parameters
attributesThe KeyValueIterable of key-value pairs
Returns
common::KeyValueIterable

Definition at line 124 of file 9.2/includes/opentelemetry/common/key_value_iterable_view.h.

◆ MakeAttributes() [4/8]

static const common::KeyValueIterable& common::MakeAttributes ( const common::KeyValueIterable &  attributes)
inlinestaticnoexcept

Utility function to help to make a attribute view from a KeyValueIterable.

Parameters
attributesThe KeyValueIterable of key-value pairs
Returns
common::KeyValueIterable

Definition at line 124 of file includes/opentelemetry/common/key_value_iterable_view.h.

◆ MakeAttributes() [5/8]

static nostd::span<const std::pair<nostd::string_view, common::AttributeValue> > common::MakeAttributes ( nostd::span< const std::pair< nostd::string_view, common::AttributeValue >>  attributes)
inlinestaticnoexcept

Utility function to help to make a attribute view from a span.

Parameters
attributesThe span of key-value pairs
Returns
nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>

Definition at line 112 of file includes/opentelemetry/common/key_value_iterable_view.h.

◆ MakeAttributes() [6/8]

static nostd::span<const std::pair<nostd::string_view, common::AttributeValue> > common::MakeAttributes ( nostd::span< const std::pair< nostd::string_view, common::AttributeValue >>  attributes)
inlinestaticnoexcept

Utility function to help to make a attribute view from a span.

Parameters
attributesThe span of key-value pairs
Returns
nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>

Definition at line 112 of file 9.2/includes/opentelemetry/common/key_value_iterable_view.h.

◆ MakeAttributes() [7/8]

static nostd::span<const std::pair<nostd::string_view, common::AttributeValue> > common::MakeAttributes ( std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >>  attributes)
inlinestaticnoexcept

Utility function to help to make a attribute view from initializer_list.

Parameters
attributesThe initializer_list of key-value pairs
Returns
nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>

Definition at line 98 of file 9.2/includes/opentelemetry/common/key_value_iterable_view.h.

References nostd::span< T, Extent >::begin().

◆ MakeAttributes() [8/8]

static nostd::span<const std::pair<nostd::string_view, common::AttributeValue> > common::MakeAttributes ( std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >>  attributes)
inlinestaticnoexcept

Utility function to help to make a attribute view from initializer_list.

Parameters
attributesThe initializer_list of key-value pairs
Returns
nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>

Definition at line 98 of file includes/opentelemetry/common/key_value_iterable_view.h.

References nostd::span< T, Extent >::begin().

◆ MakeKeyValueIterableView()

template<class T , nostd::enable_if_t< detail::is_key_value_iterable< T >::value > * = nullptr>
KeyValueIterableView< T > common::MakeKeyValueIterableView ( const T &  container)
noexcept

Variable Documentation

◆ SPINLOCK_FAST_ITERATIONS

constexpr int common::SPINLOCK_FAST_ITERATIONS = 100
constexpr

◆ SPINLOCK_SLEEP_MS

constexpr int common::SPINLOCK_SLEEP_MS = 1
constexpr