relay_cardinality::limiter

Trait Reporter

source
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§

source

fn reject(&mut self, limit: &'a CardinalityLimit, entry_id: EntryId)

Called for ever Entry which was rejected from the Limiter.

source

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.

Implementors§