|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
8 #include "opentelemetry/common/attribute_value.h"
9 #include "opentelemetry/common/key_value_iterable_view.h"
10 #include "opentelemetry/nostd/span.h"
11 #include "opentelemetry/nostd/string_view.h"
12 #include "opentelemetry/nostd/type_traits.h"
13 #include "opentelemetry/trace/span_context.h"
14 #include "opentelemetry/trace/span_context_kv_iterable.h"
15 #include "opentelemetry/trace/span_context_kv_iterable_view.h"
16 #include "opentelemetry/trace/span_metadata.h"
18 #include "opentelemetry/version.h"
62 virtual ~Span() =
default;
95 this->
AddEvent(name, std::chrono::system_clock::now(), attributes);
102 const T &attributes) noexcept
116 std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>>
120 nostd::span<
const std::pair<nostd::string_view, common::AttributeValue>>{
121 attributes.
begin(), attributes.end()});
125 std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>>
128 this->
AddEvent(name, std::chrono::system_clock::now(),
129 nostd::span<
const std::pair<nostd::string_view, common::AttributeValue>>{
130 attributes.
begin(), attributes.end()});
133 #if OPENTELEMETRY_ABI_VERSION_NO >= 2
163 void AddLink(
const SpanContext &target,
const U &attrs)
166 this->AddLink(target, view);
176 void AddLink(
const SpanContext &target,
177 std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>> attrs)
181 attrs.
begin(), attrs.end()};
188 return this->AddLink(target, view);
198 template <class U, nostd::enable_if_t<detail::is_span_context_kv_iterable<U>::value> * =
nullptr>
199 void AddLinks(
const U &links)
201 SpanContextKeyValueIterableView<U> view(links);
202 this->AddLinks(view);
213 std::initializer_list<
214 std::pair<SpanContext,
215 std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>>>>
220 SpanContext, std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>>>>
221 container{links.
begin(), links.end()};
224 SpanContextKeyValueIterableView<
nostd::span<
const std::pair<
225 SpanContext, std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>>>>>
228 return this->AddLinks(view);
249 virtual
void End(const
trace::EndSpanOptions &options = {}) noexcept = 0;
void AddEvent(nostd::string_view name, const T &attributes) noexcept
Supports internal iteration over a collection of SpanContext/key-value pairs.
T * begin() const noexcept
virtual void SetAttribute(nostd::string_view key, const common::AttributeValue &value) noexcept=0
Sets an attribute on the Span (ABI).
Span & operator=(const Span &)=delete
A timepoint relative to the system clock epoch.
#define OPENTELEMETRY_BEGIN_NAMESPACE
virtual void SetStatus(StatusCode code, nostd::string_view description="") noexcept=0
virtual void End(const trace::EndSpanOptions &options={}) noexcept=0
Mark the end of the Span.
void AddEvent(nostd::string_view name, common::SystemTimestamp timestamp, const T &attributes) noexcept
#define OPENTELEMETRY_END_NAMESPACE
virtual void UpdateName(nostd::string_view name) noexcept=0
void AddEvent(nostd::string_view name, std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >> attributes) noexcept
virtual bool IsRecording() const noexcept=0
virtual void AddEvent(nostd::string_view name, const common::KeyValueIterable &attributes) noexcept
Supports internal iteration over a collection of key-value pairs.
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 void AddEvent(nostd::string_view name) noexcept=0
virtual trace::SpanContext GetContext() const noexcept=0
void AddEvent(nostd::string_view name, common::SystemTimestamp timestamp, std::initializer_list< std::pair< nostd::string_view, common::AttributeValue >> attributes) noexcept
std::string_view string_view
Back port of std::string_view to work with pre-cpp-17 compilers.