Expand description
hyperlane-plugin-tracing
Lock-free W3C Trace Context (traceparent/tracestate), X-Request-Id,
Server-Timing, and pluggable SpanExporter distributed tracing plugin
for Hyperlane.
Structs§
- Span
Record - Completed request span emitted to registered
SpanExporterbackends. - Trace
Context - Active W3C Trace Context and request correlation metadata stored in Hyperlane
Context. - Tracing
Config - Configuration for
TracingPlugin. - Tracing
Plugin - Process-wide
TracingPluginsingleton storingTracingConfigandSpanExporterhooks. - Tracing
Request Hook - Opt-in request middleware establishing
TraceContextand setting correlation headers early. - Tracing
Response Hook - Opt-in response middleware recording latency, setting
Server-Timing, and exporting spans.
Constants§
- ATTR_
TRACE_ CONTEXT - Context attribute key storing the active
crate::TraceContext. - HEADER_
TRACEPARENT - Standard W3C Trace Context
traceparentheader name. - HEADER_
TRACESTATE - Standard W3C Trace Context
tracestateheader name.
Traits§
- Span
Exporter - Pluggable exporter receiving completed HTTP request spans.
Functions§
- format_
traceparent - Formats a W3C
traceparentheader string (00-<trace_id>-<span_id>-<flags>). - generate_
span_ id - Generates a non-zero 64-bit W3C span ID encoded as 16 lowercase hexadecimal characters.
- generate_
trace_ id - Generates a non-zero 128-bit W3C trace ID encoded as 32 lowercase hexadecimal characters.
- parse_
traceparent - Parses a W3C
traceparentheader (00-<32hex>-<16hex>-<2hex>).
Type Aliases§
- Shared
Span Exporter - Thread-safe shared reference to a pluggable
SpanExporter.