Module tracing_subscriber::filter
source · Expand description
Layers that control which spans and events are enabled by the wrapped
subscriber.
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 Layers, see the
layer module’s documentation.
Re-exports§
pub use self::targets::Targets;stdoralloc
Modules§
- combinator
registryandstdFilter combinators - targets
stdoralloc
Structs§
- BadFieldName
env-filterandstdIndicates that a field name specified in a filter directive was invalid. - Builder
env-filterandstd - Directive
env-filterandstdA single filtering directive. - 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.
- EnvFilter
env-filterandstdALayerwhich filters spans and events based on a set of filter directives. - A filter implemented by a closure or function pointer that determines whether a given span or event is enabled, based on its
Metadata. - FilterId
registryandstdUniquely identifies an individualFilterinstance in the context of aSubscriber. - Filtered
registryandstd - FromEnvError
env-filterandstdIndicates that an error occurred while parsing aEnvFilterfrom an environment variable. - A filter comparable to a verbosity
Level. - Indicates that a string could not be parsed to a valid level.
- ParseError
stdorallocIndicates that a string could not be parsed as a filtering directive.
Traits§
- FilterExt
registryandstdExtension trait adding combinators for combiningFilter.
Functions§
- Constructs a
DynFilterFnfrom a function or closure that returnstrueif a span or event should be enabled within a particular span context.