|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
8 #include "detail/hex.h"
9 #include "detail/string.h"
10 #include "opentelemetry/context/propagation/text_map_propagator.h"
11 #include "opentelemetry/trace/context.h"
12 #include "opentelemetry/trace/default_span.h"
13 #include "opentelemetry/version.h"
80 if (trace_flags.
length() != 1 || (trace_flags[0] !=
'1' && trace_flags[0] !=
'd'))
96 if (!singleB3Header.empty())
98 std::array<nostd::string_view, 3> fields{};
105 trace_id_hex = fields[0];
106 span_id_hex = fields[1];
107 trace_flags_hex = fields[2];
124 if (!trace_id.IsValid() || !span_id.IsValid())
149 static_assert(
sizeof(trace_identity) == 51,
"b3 trace identity buffer size mismatch");
static const nostd::string_view kB3SpanIdHeader
context::Context SetSpan(context::Context &context, const nostd::shared_ptr< Span > &span) noexcept
const trace::TraceId & trace_id() const noexcept
void ToLowerBase16(nostd::span< char, 2 *kSize > buffer) const noexcept
DefaultSpan provides a non-operational Span that propagates the tracer context by wrapping it inside ...
Provide a type-erased version of std::shared_ptr that has ABI stability.
static const nostd::string_view kB3TraceIdHeader
#define OPENTELEMETRY_BEGIN_NAMESPACE
static const int kTraceIdHexStrLength
size_t SplitString(nostd::string_view s, char separator, nostd::string_view *results, size_t count)
Splits a string by separator, up to given buffer count words.
bool IsSampled() const noexcept
static const nostd::string_view kB3CombinedHeader
static const nostd::string_view kB3SampledHeader
virtual void Set(nostd::string_view key, nostd::string_view value) noexcept=0
nostd::shared_ptr< Span > GetSpan(const context::Context &context) noexcept
static const int kSpanIdHexStrLength
#define OPENTELEMETRY_END_NAMESPACE
const trace::TraceFlags & trace_flags() const noexcept
bool IsValidHex(nostd::string_view s)
void ToLowerBase16(nostd::span< char, 2 > buffer) const noexcept
size_type length() const noexcept
void ToLowerBase16(nostd::span< char, 2 *kSize > buffer) const noexcept
bool Fields(nostd::function_ref< bool(nostd::string_view)> callback) const noexcept override
bool IsValid() const noexcept
const trace::SpanId & span_id() const noexcept
virtual nostd::string_view Get(nostd::string_view key) const noexcept=0
void Inject(context::propagation::TextMapCarrier &carrier, const context::Context &context) noexcept override
bool HexToBinary(nostd::string_view hex, uint8_t *buffer, size_t buffer_size)
Converts a hexadecimal to binary format if the hex string will fit the buffer.
static constexpr uint8_t kIsSampled
static SpanContext GetInvalid() noexcept
Back port of std::string_view to work with pre-cpp-17 compilers.