Module tracing

Source
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 the tracing and opentelemetry 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§

MetricsLayer 🔒
OpenTelemetryConfig
Configuration for the opentelemetry library.
OpenTelemetryContext
An OpenTelemetry context.
PrefixFormat
A wrapper around a FormatEvent that adds an optional prefix to each event.
SentryConfig
Configures Sentry reporting.
StderrLogConfig
Configures the stderr log.
TokioConsoleConfigtokio-console
Configuration of the Tokio console integration.
TracingConfig
Application tracing configuration.
TracingGuard
A guard for the tracing infrastructure configured with configure.
TracingHandle
A handle to the tracing infrastructure configured with configure.

Enums§

StderrLogFormat
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 tracing Subscriber constructed and initialized in configure. The value is written when configure runs.
LOGGING_DEFAULTS
Same as LOGGING_DEFAULTS_STR, but structured as Directives.
OPENTELEMETRY_DEFAULTS
Same as OPENTELEMETRY_DEFAULTS_STR, but structured as Directives.
SENTRY_DEFAULTS
Same as SENTRY_DEFAULTS_STR, but structured as Directives.

Functions§

configure
Enables application tracing via the tracing and opentelemetry libraries.
crate_level
Returns the Level of a crate from an EnvFilter by performing an exact match between crate and the original EnvFilter directive.

Type Aliases§

DirectiveReloader 🔒
GlobalSubscriber 🔒
The GLOBAL_SUBSCRIBER type.
Reloader 🔒