🛈 Note: This is pre-release documentation for the upcoming tracing 0.2.0 ecosystem.

For the release documentation, please see docs.rs, instead.

tracing_subscriber

Module filter

Source
Expand description

Subscribers that control which spans and events are enabled by the wrapped collector.

This module contains a number of types that provide implementations of various strategies for filtering which spans and events are enabled. For details on filtering spans and events using Subscribe implementations, see the subscribe module documentation.

Re-exports§

pub use self::targets::Targets;std or alloc

Modules§

combinatorregistry and std
Filter combinators
targetsstd or alloc
A filter that enables or disables spans and events based on their target and level.

Structs§

BadFieldNameenv-filter and std
Indicates that a field name specified in a filter directive was invalid.
Builderenv-filter and std
A builder for constructing new EnvFilters.
Directiveenv-filter and std
A single filtering directive.
DynFilterFn
A filter implemented by a closure or function pointer that determines whether a given span or event is enabled dynamically, potentially based on the current span context.
EnvFilterenv-filter and std
A Subscriber which filters spans and events based on a set of filter directives.
FilterFn
A filter implemented by a closure or function pointer that determines whether a given span or event is enabled, based on its Metadata.
FilterIdregistry and std
Uniquely identifies an individual Filter instance in the context of a collector.
Filteredregistry and std
A Subscribe that wraps an inner Subscribe and adds a Filter which controls what spans and events are enabled for that subscriber.
FromEnvErrorenv-filter and std
Indicates that an error occurred while parsing a EnvFilter from an environment variable.
LevelFilter
A filter comparable to a verbosity Level.
LevelParseError
Indicates that a string could not be parsed to a valid level.
ParseErrorstd or alloc
Indicates that a string could not be parsed as a filtering directive.

Traits§

FilterExtregistry and std
Extension trait adding combinators for combining Filter.

Functions§

dynamic_filter_fn
Constructs a DynFilterFn from a function or closure that returns true if a span or event should be enabled within a particular span context.
filter_fn
Constructs a FilterFn, from a function or closure that returns true if a span or event should be enabled, based on its Metadata.