A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
Loading...
Searching...
No Matches
a11::obs::Tracer Class Reference

Factory that makes parentage explicit for A11's migrating fibers. More...

#include <cpp/a11/obs/tracer.h>

Static Public Member Functions

static Span StartSpan (std::string_view name, SpanKind kind, const TraceContext *parent)
 Continue parent, or begin a root when it is null or empty.
 
static Span StartChildSpan (std::string_view name, SpanKind kind, const Span &parent)
 Start an in-process child and inherit the parent's baggage.
 
static Span StartRootSpan (std::string_view name, SpanKind kind, std::string_view preassigned_trace_id={})
 Start a root span, optionally using a preassigned 32-character trace id.
 

Detailed Description

Factory that makes parentage explicit for A11's migrating fibers.

A remote TraceContext or in-process Span is always supplied explicitly; OpenTelemetry's thread-local current span cannot represent handlers that migrate between workers. Every method returns an inactive Span when tracing is unconfigured, so instrumentation needs no conditional path.

Member Function Documentation

◆ StartChildSpan()

Span a11::obs::Tracer::StartChildSpan ( std::string_view  name,
SpanKind  kind,
const Span parent 
)
static

Start an in-process child and inherit the parent's baggage.

◆ StartRootSpan()

Span a11::obs::Tracer::StartRootSpan ( std::string_view  name,
SpanKind  kind,
std::string_view  preassigned_trace_id = {} 
)
static

Start a root span, optionally using a preassigned 32-character trace id.

◆ StartSpan()

Span a11::obs::Tracer::StartSpan ( std::string_view  name,
SpanKind  kind,
const TraceContext parent 
)
static

Continue parent, or begin a root when it is null or empty.


The documentation for this class was generated from the following files: