|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
8 #include "opentelemetry/common/key_value_iterable.h"
9 #include "opentelemetry/plugin/detail/tracer_handle.h"
10 #include "opentelemetry/trace/span_context_kv_iterable.h"
11 #include "opentelemetry/trace/tracer.h"
12 #include "opentelemetry/version.h"
18 class DynamicLibraryHandle;
50 span_->
AddEvent(name, timestamp, attributes);
53 #if OPENTELEMETRY_ABI_VERSION_NO >= 2
57 span_->AddLink(target, attrs);
62 span_->AddLinks(links);
80 std::shared_ptr<trace::Tracer> tracer_;
84 class Tracer final :
public trace::Tracer,
public std::enable_shared_from_this<Tracer>
87 Tracer(std::shared_ptr<DynamicLibraryHandle> library_handle,
88 std::unique_ptr<TracerHandle> &&tracer_handle) noexcept
91 #if OPENTELEMETRY_ABI_VERSION_NO >= 2
103 auto span = tracer_handle_->tracer().StartSpan(name, attributes, links, options);
111 #if OPENTELEMETRY_ABI_VERSION_NO == 1
113 void ForceFlushWithMicroseconds(uint64_t timeout) noexcept
override
115 tracer_handle_->tracer().ForceFlushWithMicroseconds(timeout);
118 void CloseWithMicroseconds(uint64_t timeout) noexcept
override
120 tracer_handle_->tracer().CloseWithMicroseconds(timeout);
129 std::shared_ptr<DynamicLibraryHandle> library_handle_;
130 std::unique_ptr<TracerHandle> tracer_handle_;
EndSpanOptions provides options to set properties of a Span when it is ended.
void AddEvent(nostd::string_view name, common::SystemTimestamp timestamp) noexcept override
StartSpanOptions provides options to set properties of a Span at the time of its creation.
Supports internal iteration over a collection of SpanContext/key-value pairs.
nostd::shared_ptr< trace::Span > StartSpan(nostd::string_view name, const common::KeyValueIterable &attributes, const trace::SpanContextKeyValueIterable &links, const trace::StartSpanOptions &options={}) noexcept override
trace::SpanContext GetContext() const noexcept override
A Span represents a single operation within a Trace.
virtual void SetAttribute(nostd::string_view key, const common::AttributeValue &value) noexcept=0
Sets an attribute on the Span (ABI).
Tracer(std::shared_ptr< DynamicLibraryHandle > library_handle, std::unique_ptr< TracerHandle > &&tracer_handle) noexcept
A timepoint relative to the system clock epoch.
void SetStatus(trace::StatusCode code, nostd::string_view description) noexcept override
Handles span creation and in-process context propagation.
#define OPENTELEMETRY_BEGIN_NAMESPACE
virtual void SetStatus(StatusCode code, nostd::string_view description="") noexcept=0
void AddEvent(nostd::string_view name) noexcept override
void End(const trace::EndSpanOptions &options={}) noexcept override
Span(std::shared_ptr< trace::Tracer > &&tracer, const nostd::shared_ptr< trace::Span > &span) noexcept
bool IsRecording() const noexcept override
virtual void End(const trace::EndSpanOptions &options={}) noexcept=0
Mark the end of the Span.
void SetAttribute(nostd::string_view name, const common::AttributeValue &value) noexcept override
#define OPENTELEMETRY_END_NAMESPACE
virtual void UpdateName(nostd::string_view name) noexcept=0
constexpr absl::OTABSL_OPTION_NAMESPACE_NAME::remove_reference_t< T > && move(T &&t) noexcept
virtual bool IsRecording() const noexcept=0
Supports internal iteration over a collection of key-value pairs.
virtual void AddEvent(nostd::string_view name) noexcept=0
void UpdateName(nostd::string_view name) noexcept override
virtual trace::SpanContext GetContext() const noexcept=0
void AddEvent(nostd::string_view name, const common::KeyValueIterable &attributes) noexcept override
void AddEvent(nostd::string_view name, common::SystemTimestamp timestamp, const common::KeyValueIterable &attributes) noexcept override
Back port of std::string_view to work with pre-cpp-17 compilers.