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
configurefunction, which configures thetracingandopentelemetrycrates with sensible defaults and should be called during initialization of every Materialize binary. -
The
OpenTelemetryContexttype, which carries a tracing span across thread or task boundaries within a process.
Structs§
- Metrics
Layer 🔒 - Open
Telemetry Config - Configuration for the
opentelemetrylibrary. - Open
Telemetry Context - An OpenTelemetry context.
- Prefix
Format - A wrapper around a
FormatEventthat 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
Arcof the tracingSubscriberconstructed and initialized inconfigure. The value is written whenconfigureruns. - LOGGING_
DEFAULTS - Same as
LOGGING_DEFAULTS_STR, but structured asDirectives. - OPENTELEMETRY_
DEFAULTS - Same as
OPENTELEMETRY_DEFAULTS_STR, but structured asDirectives. - SENTRY_
DEFAULTS - Same as
SENTRY_DEFAULTS_STR, but structured asDirectives.
Functions§
- configure
- Enables application tracing via the
tracingandopentelemetrylibraries. - crate_
level - Returns the
Levelof a crate from anEnvFilterby performing an exact match betweencrateand the originalEnvFilterdirective.
Type Aliases§
- Directive
Reloader 🔒 - Global
Subscriber 🔒 - The
GLOBAL_SUBSCRIBERtype. - Reloader 🔒