Expand description
This crate provides:
- A tracing layer,
TelemetryLayer
, that can be used to publish trace data to honeycomb.io - Utilities for implementing distributed tracing against the honeycomb.io backend
As a tracing layer, TelemetryLayer
can be composed with other layers to provide stdout logging, filtering, etc.
Re-exports§
pub use tracing_distributed::TelemetryLayer;
pub use tracing_distributed::TraceCtxError;
Structs§
- Open
Telemetry - Telemetry capability that publishes events and spans to some OpenTelemetry backend
- SpanId
- SpanId is an 8-byte value which uniquely identifies a given span within a trace
The actual
u64
value is wrapped in a tuple struct in order to leverage the newtype pattern - TraceId
- TraceId is an 16-byte value which uniquely identifies a given trace
The actual
u128
value is wrapped in a tuple struct in order to leverage the newtype pattern
Functions§
- current_
dist_ trace_ ctx - Retrieve the distributed trace context associated with the current span.
- new_
blackhole_ telemetry_ layer - Construct a TelemetryLayer that does not publish telemetry to any backend.
- new_
opentelemetry_ layer - Construct a TelemetryLayer that publishes telemetry to honeycomb.io using the provided honeycomb config.
- register_
dist_ tracing_ root - Register the current span as the local root of a distributed trace.