Expand description
This crate provides:
TelemetryLayer
, a generic tracing layer that handles publishing spans and events to arbitrary backends- Utilities for implementing distributed tracing for arbitrary backends
As a tracing layer, TelemetryLayer
can be composed with other layers to provide stdout logging, filtering, etc.
This crate is primarily intended to be used by people implementing their own backends.
A concrete implementation using honeycomb.io as a backend is available in the tracing-honeycomb
crate.
Structs§
- Blackhole
Telemetry - Telemetry implementation that does not publish information to any backend. For use in tests.
- Event
- An
Event
holds ready-to-publish information derived from atracing::Event
. - Span
- A
Span
holds ready-to-publish information gathered during the lifetime of atracing::Span
. - Telemetry
Layer - A
tracing_subscriber::Layer
that publishes events and spans to some backend using the providedTelemetry
capability.
Enums§
- Trace
CtxError - Errors that can occur while registering the current span as a distributed trace root or attempting to retrieve the current trace context.
Traits§
- Telemetry
- Represents the ability to publish events and spans to some arbitrary backend.
Functions§
- current_
dist_ trace_ ctx - Retrieve the distributed trace context associated with the current span. Returns the
TraceId
, if any, that the current span is associated with along with theSpanId
belonging to the current span. - register_
dist_ tracing_ root - Register the current span as the local root of a distributed trace.