Available on crate feature
tracing
only.Expand description
Tracing utilities.
This module contains application tracing utilities built on top of the
tracing
and opentelemetry
libraries. The key exports are:
-
The
configure
function, which configures thetracing
andopentelemetry
crates with sensible defaults and should be called during initialization of every Materialize binary. -
The
OpenTelemetryContext
type, which carries a tracing span across thread or task boundaries within a process.
Structs§
- Metrics
Layer 🔒 - Open
Telemetry Config - Configuration for the
opentelemetry
library. - Open
Telemetry Context - An OpenTelemetry context.
- Prefix
Format - A wrapper around a
FormatEvent
that adds an optional prefix to each event. - Sentry
Config - Configures Sentry reporting.
- Stderr
LogConfig - Configures the stderr log.
- Tokio
Console Config tokio-console
- Configuration of the Tokio console integration.
- Tracing
Config - Application tracing configuration.
- Tracing
Guard - A guard for the tracing infrastructure configured with
configure
. - Tracing
Handle - A handle to the tracing infrastructure configured with
configure
.
Enums§
- Stderr
LogFormat - Specifies the format of a stderr log message.
Constants§
- LOGGING_
DEFAULTS_ STR - By default we turn off tracing from the following crates, because they have error spans which are noisy.
- OPENTELEMETRY_
DEFAULTS_ STR - By default we turn off tracing from the following crates, because they have long-lived Spans, which OpenTelemetry does not handle well.
- SENTRY_
DEFAULTS_ STR - By default we turn off tracing from the following crates, because they have error spans which are noisy.
Statics§
- GLOBAL_
SUBSCRIBER - An
Arc
of the tracingSubscriber
constructed and initialized inconfigure
. The value is written whenconfigure
runs. - LOGGING_
DEFAULTS - Same as
LOGGING_DEFAULTS_STR
, but structured asDirective
s. - OPENTELEMETRY_
DEFAULTS - Same as
OPENTELEMETRY_DEFAULTS_STR
, but structured asDirective
s. - SENTRY_
DEFAULTS - Same as
SENTRY_DEFAULTS_STR
, but structured asDirective
s.
Functions§
- configure
- Enables application tracing via the
tracing
andopentelemetry
libraries. - crate_
level - Returns the
Level
of a crate from anEnvFilter
by performing an exact match betweencrate
and the originalEnvFilter
directive.
Type Aliases§
- Directive
Reloader 🔒 - Global
Subscriber 🔒 - The
GLOBAL_SUBSCRIBER
type. - Reloader 🔒