Skip to main content

Module tracing

Module tracing 

Source
Expand description

Tracing core rexport and utilities, for your conveneince

Re-exports§

pub use ::tracing_subscriber as subscriber;

Modules§

appender
Writers for logging events and spans
callsite
Callsites represent the source locations from which spans or events originate.
dispatcher
Dispatches trace events to Subscribers.
event
Events represent single points in time during the execution of a program.
field
Span and Event key-value data.
instrument
Attach a span to a std::future::Future.
level_filters
Trace verbosity level filtering.
metadata
Metadata describing trace data.
span
Spans represent periods of time in which a program was executing in a particular context.

Macros§

debug
Constructs an event at the debug level.
enabled
Checks whether a span or event is enabled based on the provided metadata.
error
Constructs an event at the error level.
error_span
Constructs a span at the error level.
event
Constructs a new Event.
event_enabled
Tests whether an event with the specified level and target would be enabled.
info
Constructs an event at the info level.
metadata
Statically constructs new span metadata.
record_all
Records multiple values on a span in a single call. As with recording individual values, all fields must be declared when the span is created.
span_enabled
Tests whether a span with the specified level and target would be enabled.
trace
Constructs an event at the trace level.
warn
Constructs an event at the warn level.
warn_span
Constructs a span at the warn level.

Structs§

Dispatch
Dispatch trace data to a Subscriber.
Event
Events represent single points in time where something occurred during the execution of a program.
FilteredOpenTelemetryLayer
A layer wrapping a OpenTelemetryLayer, discarding all events filtered out by a given [Filter]. This can be built by calling OpenTelemetryLayer::with_counting_event_filter.
Id
Identifies a span within the context of a subscriber.
Level
Describes the level of verbosity of a span or event.
Metadata
Metadata describing a span or event.
MetricsLayer
A layer that publishes metrics via the OpenTelemetry SDK.
OpenTelemetryLayer
An OpenTelemetry propagation layer for use in a project that uses tracing.
OtelData
Per-span OpenTelemetry data tracked by this crate.
Span
A handle representing a span, with the capability to enter the span if it exists.

Enums§

SetParentError
An error returned if OpenTelemetrySpanExt::set_parent could not set the parent.

Traits§

Callsite
Trait implemented by callsites.
Instrument
Attaches spans to a std::future::Future.
OpenTelemetrySpanExt
Utility functions to allow tracing Spans to accept and return OpenTelemetry Contexts.
Subscriber
Trait representing the functions required to collect trace data.
Value
A field value of an erased type.

Functions§

get_otel_context
Utility functions to allow tracing ExtensionsMuts to return OpenTelemetry Contexts.
layer
Construct a layer to track spans via OpenTelemetry.

Attribute Macros§

instrument
Instruments a function to create and enter a tracing span every time the function is called.