Enum relay_metrics::Aggregator
source · pub enum Aggregator {
AcceptsMetrics(AcceptsMetrics, Sender<bool>),
MergeBuckets(MergeBuckets),
}
Expand description
Aggregator for metric buckets.
Buckets are flushed to a receiver after their time window and a grace period have passed.
Metrics with a recent timestamp are given a longer grace period than backdated metrics, which
are flushed after a shorter debounce delay. See AggregatorServiceConfig
for configuration options.
Internally, the aggregator maintains a continuous flush cycle every 100ms. It guarantees that
all elapsed buckets belonging to the same ProjectKey
are flushed together.
Receivers must implement a handler for the FlushBuckets
message.
Variants§
AcceptsMetrics(AcceptsMetrics, Sender<bool>)
The health check message which makes sure that the service can accept the requests now.
MergeBuckets(MergeBuckets)
Merge the buckets.
Trait Implementations§
source§impl Debug for Aggregator
impl Debug for Aggregator
source§impl FromMessage<AcceptsMetrics> for Aggregator
impl FromMessage<AcceptsMetrics> for Aggregator
§type Response = AsyncResponse<bool>
type Response = AsyncResponse<bool>
The behavior declaring the return value when sending this message.
source§fn from_message(message: AcceptsMetrics, sender: Sender<bool>) -> Self
fn from_message(message: AcceptsMetrics, sender: Sender<bool>) -> Self
Converts the message into the service interface.
source§impl FromMessage<MergeBuckets> for Aggregator
impl FromMessage<MergeBuckets> for Aggregator
source§fn from_message(message: MergeBuckets, _: ()) -> Self
fn from_message(message: MergeBuckets, _: ()) -> Self
Converts the message into the service interface.
impl Interface for Aggregator
Auto Trait Implementations§
impl !RefUnwindSafe for Aggregator
impl Send for Aggregator
impl Sync for Aggregator
impl Unpin for Aggregator
impl !UnwindSafe for Aggregator
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more