Struct tracing_subscriber::filter::FilterId
source · pub struct FilterId(/* private fields */);
registry
and std
only.Expand description
Uniquely identifies an individual Filter
instance in the context of
a collector.
When adding a Filtered
Subscribe
to a collector, the collector
generates a FilterId
for that Filtered
subscriber. The Filtered
subscriber
will then use the generated ID to query whether a particular span was
previously enabled by that subscriber’s Filter
.
Note: Currently, the Registry
type provided by this crate is the
only Collect
implementation capable of participating in per-subscriber
filtering. Therefore, the FilterId
type cannot currently be constructed by
code outside of tracing-subscriber
. In the future, new APIs will be added to tracing-subscriber
to
allow non-Registry collectors to also participate in per-subscriber
filtering. When those APIs are added, subscribers will be responsible
for generating and assigning FilterId
s.