Skip to main content

vector/internal_events/
aggregate.rs

1use vector_lib::{
2    NamedInternalEvent, counter,
3    internal_event::{CounterName, InternalEvent},
4};
5
6#[derive(Debug, NamedInternalEvent)]
7pub struct AggregateEventRecorded;
8
9impl InternalEvent for AggregateEventRecorded {
10    fn emit(self) {
11        counter!(CounterName::AggregateEventsRecordedTotal).increment(1);
12    }
13}
14
15#[derive(Debug, NamedInternalEvent)]
16pub struct AggregateFlushed;
17
18impl InternalEvent for AggregateFlushed {
19    fn emit(self) {
20        counter!(CounterName::AggregateFlushesTotal).increment(1);
21    }
22}
23
24#[derive(Debug, NamedInternalEvent)]
25pub struct AggregateUpdateFailed;
26
27impl InternalEvent for AggregateUpdateFailed {
28    fn emit(self) {
29        counter!(CounterName::AggregateFailedUpdates).increment(1);
30    }
31}