NVIDIA DeepStream SDK API Reference

9.2 Release
sdk::common Namespace Reference

Namespaces

 internal_log
 

Data Structures

class  AtomicSharedPtr
 A wrapper to provide atomic shared pointers. More...
 
class  AtomicUniquePtr
 An owning pointer similar to std::unique_ptr but with methods for atomic operations. More...
 
struct  AttributeConverter
 Creates an owned copy (OwnedAttributeValue) of a non-owning AttributeValue. More...
 
struct  AttributeEqualToVisitor
 Evaluates if an owned value (from an OwnedAttributeValue) is equal to another value (from a non-owning AttributeValue). More...
 
class  AttributeMap
 Class for storing attributes. More...
 
class  CircularBuffer
 
class  CircularBufferRange
 A non-owning view into a range of elements in a circular buffer. More...
 
struct  FnvOffset
 
struct  FnvOffset< Ty, 4 >
 
struct  FnvOffset< Ty, 8 >
 
struct  FnvPrime
 FNV Hashing Utilities. More...
 
struct  FnvPrime< Ty, 4 >
 
struct  FnvPrime< Ty, 8 >
 
struct  GetHashForAttributeValueVisitor
 
class  OrderedAttributeMap
 Class for storing attributes. More...
 
struct  StringViewEqual
 
struct  StringViewHash
 Hash and equality for nostd::string_view, enabling safe use in unordered_map without requiring null termination. More...
 
class  ThreadInstrumentation
 Thread instrumentation interface. More...
 

Typedefs

using OwnedAttributeValue = nostd::variant< bool, int32_t, uint32_t, int64_t, double, std::string, std::vector< bool >, std::vector< int32_t >, std::vector< uint32_t >, std::vector< int64_t >, std::vector< double >, std::vector< std::string >, uint64_t, std::vector< uint64_t >, std::vector< uint8_t > >
 A counterpart to AttributeValue that makes sure a value is owned. More...
 

Enumerations

enum  OwnedAttributeType {
  kTypeBool,
  kTypeInt,
  kTypeUInt,
  kTypeInt64,
  kTypeDouble,
  kTypeString,
  kTypeSpanBool,
  kTypeSpanInt,
  kTypeSpanUInt,
  kTypeSpanInt64,
  kTypeSpanDouble,
  kTypeSpanString,
  kTypeUInt64,
  kTypeSpanUInt64,
  kTypeSpanByte,
  kTypeBool,
  kTypeInt,
  kTypeUInt,
  kTypeInt64,
  kTypeDouble,
  kTypeString,
  kTypeSpanBool,
  kTypeSpanInt,
  kTypeSpanUInt,
  kTypeSpanInt64,
  kTypeSpanDouble,
  kTypeSpanString,
  kTypeUInt64,
  kTypeSpanUInt64,
  kTypeSpanByte
}
 
enum  ExportResult {
  ExportResult::kSuccess = 0,
  ExportResult::kFailure = 1,
  ExportResult::kFailureFull = 2,
  ExportResult::kFailureInvalidArgument = 3,
  ExportResult::kSuccess = 0,
  ExportResult::kFailure = 1,
  ExportResult::kFailureFull = 2,
  ExportResult::kFailureInvalidArgument = 3
}
 ExportResult is returned as result of exporting a batch of Records. More...
 
enum  OwnedAttributeType {
  kTypeBool,
  kTypeInt,
  kTypeUInt,
  kTypeInt64,
  kTypeDouble,
  kTypeString,
  kTypeSpanBool,
  kTypeSpanInt,
  kTypeSpanUInt,
  kTypeSpanInt64,
  kTypeSpanDouble,
  kTypeSpanString,
  kTypeUInt64,
  kTypeSpanUInt64,
  kTypeSpanByte,
  kTypeBool,
  kTypeInt,
  kTypeUInt,
  kTypeInt64,
  kTypeDouble,
  kTypeString,
  kTypeSpanBool,
  kTypeSpanInt,
  kTypeSpanUInt,
  kTypeSpanInt64,
  kTypeSpanDouble,
  kTypeSpanString,
  kTypeUInt64,
  kTypeSpanUInt64,
  kTypeSpanByte
}
 
enum  ExportResult {
  ExportResult::kSuccess = 0,
  ExportResult::kFailure = 1,
  ExportResult::kFailureFull = 2,
  ExportResult::kFailureInvalidArgument = 3,
  ExportResult::kSuccess = 0,
  ExportResult::kFailure = 1,
  ExportResult::kFailureFull = 2,
  ExportResult::kFailureInvalidArgument = 3
}
 ExportResult is returned as result of exporting a batch of Records. More...
 

Functions

template<class T >
void GetHash (size_t &seed, const T &arg)
 
template<class T >
void GetHash (size_t &seed, const std::vector< T > &arg)
 
template<>
void GetHash< const char * > (size_t &seed, const char *const &arg)
 
size_t GetHashForAttributeMap (const OrderedAttributeMap &attribute_map)
 
template<class T >
size_t GetHash (T value)
 
OPENTELEMETRY_EXPORT void Base64Escape (opentelemetry::nostd::string_view src, std::string *dest)
 
OPENTELEMETRY_EXPORT std::string Base64Escape (opentelemetry::nostd::string_view src)
 
OPENTELEMETRY_EXPORT bool Base64Unescape (opentelemetry::nostd::string_view src, std::string *dest)
 
template<typename Ty >
Ty Fnv1a (const void *buf, size_t len, Ty hval=FnvOffset< Ty, sizeof(Ty)>::value) noexcept
 FNV-1a hash function. More...
 
template<typename MapType >
auto find_heterogeneous (MapType &&map, opentelemetry::nostd::string_view key)
 Cross-platform heterogeneous lookup wrapper. More...
 
bool GetSdkDisabled ()
 
bool GetBoolEnvironmentVariable (const char *env_var_name, bool &value)
 Read a boolean environment variable. More...
 
bool GetDurationEnvironmentVariable (const char *env_var_name, std::chrono::system_clock::duration &value)
 Read a duration environment variable. More...
 
bool GetStringEnvironmentVariable (const char *env_var_name, std::string &value)
 Read a string environment variable. More...
 
bool GetUintEnvironmentVariable (const char *env_var_name, std::uint32_t &value)
 Read a uint32_t environment variable. More...
 
bool GetFloatEnvironmentVariable (const char *env_var_name, float &value)
 Read a float environment variable. More...
 

Typedef Documentation

◆ OwnedAttributeValue

typedef nostd::variant< bool, int32_t, uint32_t, int64_t, double, std::string, std::vector< bool >, std::vector< int32_t >, std::vector< uint32_t >, std::vector< int64_t >, std::vector< double >, std::vector< std::string >, uint64_t, std::vector< uint64_t >, std::vector< uint8_t > > sdk::common::OwnedAttributeValue

A counterpart to AttributeValue that makes sure a value is owned.

This replaces all non-owning references with owned copies.

The following types are not currently supported by the OpenTelemetry specification, but reserved for future use:

  • uint64_t
  • std::vector<uint64_t>
  • std::vector<uint8_t>

Definition at line 50 of file includes/opentelemetry/sdk/common/attribute_utils.h.

Enumeration Type Documentation

◆ ExportResult [1/2]

ExportResult is returned as result of exporting a batch of Records.

Enumerator
kSuccess 
kFailure 
kFailureFull 
kFailureInvalidArgument 
kSuccess 
kFailure 
kFailureFull 
kFailureInvalidArgument 

Definition at line 16 of file includes/opentelemetry/sdk/common/exporter_utils.h.

◆ ExportResult [2/2]

ExportResult is returned as result of exporting a batch of Records.

Enumerator
kSuccess 
kFailure 
kFailureFull 
kFailureInvalidArgument 
kSuccess 
kFailure 
kFailureFull 
kFailureInvalidArgument 

Definition at line 16 of file 9.2/includes/opentelemetry/sdk/common/exporter_utils.h.

◆ OwnedAttributeType [1/2]

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

Definition at line 52 of file 9.2/includes/opentelemetry/sdk/common/attribute_utils.h.

◆ OwnedAttributeType [2/2]

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

Definition at line 52 of file includes/opentelemetry/sdk/common/attribute_utils.h.

Function Documentation

◆ Base64Escape() [1/2]

OPENTELEMETRY_EXPORT std::string sdk::common::Base64Escape ( opentelemetry::nostd::string_view  src)

◆ Base64Escape() [2/2]

OPENTELEMETRY_EXPORT void sdk::common::Base64Escape ( opentelemetry::nostd::string_view  src,
std::string *  dest 
)

◆ Base64Unescape()

OPENTELEMETRY_EXPORT bool sdk::common::Base64Unescape ( opentelemetry::nostd::string_view  src,
std::string *  dest 
)

◆ find_heterogeneous()

template<typename MapType >
auto sdk::common::find_heterogeneous ( MapType &&  map,
opentelemetry::nostd::string_view  key 
)
inline

Cross-platform heterogeneous lookup wrapper.

Falls back to std::string construction on libc++ (macOS) and pre-c++20, but uses direct lookup on libstdc++ (Linux).

Definition at line 145 of file includes/opentelemetry/sdk/common/custom_hash_equality.h.

Referenced by sdk::metrics::FilteringAttributesProcessor::isPresent(), sdk::metrics::FilteringExcludeAttributesProcessor::isPresent(), sdk::metrics::FilteringAttributesProcessor::process(), and sdk::metrics::FilteringExcludeAttributesProcessor::process().

◆ Fnv1a()

template<typename Ty >
Ty sdk::common::Fnv1a ( const void *  buf,
size_t  len,
Ty  hval = FnvOffset<Ty, sizeof(Ty)>::value 
)
inlinenoexcept

FNV-1a hash function.

Template Parameters
TyHash integer type (std::size_t, uint32_t, uint64_t, etc.)
Parameters
bufPointer to the input buffer
lenLength of the buffer
hvalStarting hash value (defaults to offset basis)
Returns
Computed hash

Definition at line 82 of file includes/opentelemetry/sdk/common/custom_hash_equality.h.

◆ GetBoolEnvironmentVariable()

bool sdk::common::GetBoolEnvironmentVariable ( const char *  env_var_name,
bool &  value 
)

Read a boolean environment variable.

Parameters
env_var_nameEnvironment variable name
[out]valueVariable value, if it exists
Returns
true if the variable exists

◆ GetDurationEnvironmentVariable()

bool sdk::common::GetDurationEnvironmentVariable ( const char *  env_var_name,
std::chrono::system_clock::duration &  value 
)

Read a duration environment variable.

Parameters
env_var_nameEnvironment variable name
[out]valueVariable value, if it exists
Returns
true if the variable exists

◆ GetFloatEnvironmentVariable()

bool sdk::common::GetFloatEnvironmentVariable ( const char *  env_var_name,
float &  value 
)

Read a float environment variable.

Parameters
env_var_nameEnvironment variable name
[out]valueVariable value, if it exists
Returns
true if the variable exists

◆ GetHash() [1/3]

template<class T >
void sdk::common::GetHash ( size_t &  seed,
const std::vector< T > &  arg 
)
inline

◆ GetHash() [2/3]

template<class T >
void sdk::common::GetHash ( size_t &  seed,
const T &  arg 
)
inline

◆ GetHash() [3/3]

template<class T >
size_t sdk::common::GetHash ( T  value)
inline

◆ GetHash< const char * >()

template<>
void sdk::common::GetHash< const char * > ( size_t &  seed,
const char *const &  arg 
)
inline

◆ GetHashForAttributeMap()

size_t sdk::common::GetHashForAttributeMap ( const OrderedAttributeMap &  attribute_map)
inline

◆ GetSdkDisabled()

bool sdk::common::GetSdkDisabled ( )

◆ GetStringEnvironmentVariable()

bool sdk::common::GetStringEnvironmentVariable ( const char *  env_var_name,
std::string &  value 
)

Read a string environment variable.

Parameters
env_var_nameEnvironment variable name
[out]valueVariable value, if it exists
Returns
true if the variable exists

◆ GetUintEnvironmentVariable()

bool sdk::common::GetUintEnvironmentVariable ( const char *  env_var_name,
std::uint32_t &  value 
)

Read a uint32_t environment variable.

Parameters
env_var_nameEnvironment variable name
[out]valueVariable value, if it exists
Returns
true if the variable exists