Skip to main content

Crate hyperlane_plugin_tracing

Crate hyperlane_plugin_tracing 

Source
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§

SpanRecord
Completed request span emitted to registered SpanExporter backends.
TraceContext
Active W3C Trace Context and request correlation metadata stored in Hyperlane Context.
TracingConfig
Configuration for TracingPlugin.
TracingPlugin
Process-wide TracingPlugin singleton storing TracingConfig and SpanExporter hooks.
TracingRequestHook
Opt-in request middleware establishing TraceContext and setting correlation headers early.
TracingResponseHook
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 traceparent header name.
HEADER_TRACESTATE
Standard W3C Trace Context tracestate header name.

Traits§

SpanExporter
Pluggable exporter receiving completed HTTP request spans.

Functions§

format_traceparent
Formats a W3C traceparent header 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 traceparent header (00-<32hex>-<16hex>-<2hex>).

Type Aliases§

SharedSpanExporter
Thread-safe shared reference to a pluggable SpanExporter.