|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
8 #include "opentelemetry/context/context.h"
9 #include "opentelemetry/nostd/shared_ptr.h"
10 #include "opentelemetry/nostd/string_view.h"
11 #include "opentelemetry/trace/default_span.h"
12 #include "opentelemetry/trace/scope.h"
13 #include "opentelemetry/trace/span.h"
14 #include "opentelemetry/trace/span_context_kv_iterable_view.h"
15 #include "opentelemetry/trace/span_startoptions.h"
16 #include "opentelemetry/version.h"
47 return this->
StartSpan(name, {}, {}, options);
56 return this->
StartSpan(name, attributes, {}, options);
81 std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>> attributes,
85 return this->
StartSpan(name, attributes, {}, options);
93 std::initializer_list<
95 std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>>>>
103 links.begin(), links.end()},
111 std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>> attributes,
116 nostd::span<
const std::pair<nostd::string_view, common::AttributeValue>>{
117 attributes.
begin(), attributes.end()},
123 std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>> attributes,
124 std::initializer_list<
126 std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>>>>
132 nostd::span<
const std::pair<nostd::string_view, common::AttributeValue>>{attributes.
begin(),
134 nostd::span<
const std::pair<SpanContext, std::initializer_list<std::pair<
136 links.begin(), links.end()},
158 return nostd::get<nostd::shared_ptr<Span>>(active_span);
166 #if OPENTELEMETRY_ABI_VERSION_NO >= 2
175 bool Enabled() const noexcept {
return OPENTELEMETRY_ATOMIC_READ_8(&this->enabled_) != 0; }
178 #if OPENTELEMETRY_ABI_VERSION_NO == 1
189 template <
class Rep,
class Period>
190 void ForceFlush(std::chrono::duration<Rep, Period> timeout) noexcept
192 this->ForceFlushWithMicroseconds(
static_cast<uint64_t
>(
193 std::chrono::duration_cast<std::chrono::microseconds>(timeout).count()));
196 virtual void ForceFlushWithMicroseconds(uint64_t timeout) noexcept = 0;
202 template <
class Rep,
class Period>
203 void Close(std::chrono::duration<Rep, Period> timeout) noexcept
205 this->CloseWithMicroseconds(
static_cast<uint64_t
>(
206 std::chrono::duration_cast<std::chrono::microseconds>(timeout).count()));
209 virtual void CloseWithMicroseconds(uint64_t timeout) noexcept = 0;
214 #if OPENTELEMETRY_ABI_VERSION_NO >= 2
228 void UpdateEnabled(
const bool enabled) noexcept
230 OPENTELEMETRY_ATOMIC_WRITE_8(&this->enabled_, enabled);
235 #if OPENTELEMETRY_ABI_VERSION_NO >= 2
240 mutable bool enabled_ =
true;
Controls how long a span is active.
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
static Scope WithActiveSpan(nostd::shared_ptr< Span > &span) noexcept
Set the active span.
StartSpanOptions provides options to set properties of a Span at the time of its creation.
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
Supports internal iteration over a collection of SpanContext/key-value pairs.
nostd::shared_ptr< Span > StartSpan(nostd::string_view name, const T &attributes, const U &links, const StartSpanOptions &options={}) noexcept
static nostd::shared_ptr< Span > GetCurrentSpan() noexcept
Get the currently active span.
DefaultSpan provides a non-operational Span that propagates the tracer context by wrapping it inside ...
T * begin() const noexcept
Provide a type-erased version of std::shared_ptr that has ABI stability.
Handles span creation and in-process context propagation.
#define OPENTELEMETRY_BEGIN_NAMESPACE
nostd::shared_ptr< Span > StartSpan(nostd::string_view name, const common::KeyValueIterable &attributes, const StartSpanOptions &options={}) noexcept
nostd::shared_ptr< Span > StartSpan(nostd::string_view name, const StartSpanOptions &options={}) noexcept
nostd::shared_ptr< Span > StartSpan(nostd::string_view name, const T &attributes, const StartSpanOptions &options={}) noexcept
virtual nostd::shared_ptr< Span > StartSpan(nostd::string_view name, const common::KeyValueIterable &attributes, const SpanContextKeyValueIterable &links, const StartSpanOptions &options={}) noexcept=0
Starts a span.
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
#define OPENTELEMETRY_END_NAMESPACE
Supports internal iteration over a collection of key-value pairs.
nostd::shared_ptr< Span > StartSpan(nostd::string_view name, std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >> attributes, const StartSpanOptions &options={}) noexcept
typename std::enable_if< B, T >::type enable_if_t
Back port of std::enable_if_t.
Container for key-value pairs that can transform every value in it to one of types listed in common::...
virtual ~Tracer()=default
Null Span context that does not carry any information.
constexpr char kSpanKey[]
static ContextValue GetValue(nostd::string_view key, Context *context=nullptr) noexcept
constexpr bool holds_alternative(const variant< Ts... > &v) noexcept
std::string_view string_view
static SpanContext GetInvalid() noexcept
Back port of std::string_view to work with pre-cpp-17 compilers.