std::trace¶
Status: experimental
W3C trace-context-compatible distributed tracing. Identifier types, request-scoped SpanContext, process-level Tracer, and OTLP JSON export.
API details and source¶
The implementation source contains the complete declarations and implementation notes. The table below lists canonical Gossamer call signatures; every item name links directly to its implementation file.
| Item | Canonical signature or declaration | Description |
|---|---|---|
EndedSpan |
type EndedSpan |
Finalised span record; to_otlp_json() serialises for OTLP/HTTP export. |
Span |
type Span |
Active span builder. Attributes, events, status; end() finalises and records. |
SpanContext |
type SpanContext |
Request-scoped trace + span pair, propagated through std::context. |
SpanGuard |
type SpanGuard |
RAII guard returned by enter_span; restores the prior active span on drop. |
SpanId |
type SpanId |
64-bit span identifier. |
SpanStatus |
type SpanStatus |
Span outcome: Unset / Ok / Error(message). |
TraceId |
type TraceId |
128-bit trace identifier (W3C trace-context format). |
Tracer |
type Tracer |
Process-level span sink. start_span, ended_spans, set_global. |