pub trait Reporter<'a> {
// Required methods
fn reject(&mut self, limit: &'a CardinalityLimit, entry_id: EntryId);
fn report_cardinality(
&mut self,
limit: &'a CardinalityLimit,
report: CardinalityReport,
);
}
Expand description
Accumulator of all cardinality limiter decisions.
Required Methods§
sourcefn reject(&mut self, limit: &'a CardinalityLimit, entry_id: EntryId)
fn reject(&mut self, limit: &'a CardinalityLimit, entry_id: EntryId)
sourcefn report_cardinality(
&mut self,
limit: &'a CardinalityLimit,
report: CardinalityReport,
)
fn report_cardinality( &mut self, limit: &'a CardinalityLimit, report: CardinalityReport, )
Called for every individual limit applied.
The callback can be called multiple times with different reports
for the same limit
or not at all if there was no change in cardinality.
For example, with a name scoped limit can be called once for every metric name matching the limit.