pub struct AggregatorConfig {
pub bucket_interval: u32,
pub aggregator_size: u32,
pub initial_delay: u32,
pub max_secs_in_past: u64,
pub max_secs_in_future: u64,
pub max_project_key_bucket_bytes: Option<u64>,
pub max_total_bucket_bytes: Option<u64>,
pub flush_partitions: Option<u32>,
pub flush_batching: FlushBatching,
}
Expand description
Parameters used by the crate::aggregator::Aggregator
.
Fields§
§bucket_interval: u32
Determines the wall clock time interval for buckets in seconds.
Defaults to 10
seconds. Every metric is sorted into a bucket of this size based on its
timestamp. This defines the minimum granularity with which metrics can be queried later.
aggregator_size: u32
The aggregator size.
This determines how many individual bucket intervals, are stored in the aggregator. Increasing this number will add additional delay for backdated and future buckets.
Defaults to: 1.
initial_delay: u32
The initial delay in seconds to wait before flushing a bucket.
Defaults to 30
seconds. Before sending an aggregated bucket, this is the time Relay waits
for buckets that are being reported in real time.
max_secs_in_past: u64
The age in seconds of the oldest allowed bucket timestamp.
Defaults to 5 days.
max_secs_in_future: u64
The time in seconds that a timestamp may be in the future.
Defaults to 1 minute.
max_project_key_bucket_bytes: Option<u64>
Maximum amount of bytes used for metrics aggregation per project key.
Similar measuring technique to Self::max_total_bucket_bytes
, but instead of a
global/process-wide limit, it is enforced per project key.
Defaults to None
, i.e. no limit.
max_total_bucket_bytes: Option<u64>
Maximum amount of bytes used for metrics aggregation.
When aggregating metrics, Relay keeps track of how many bytes a metric takes in memory. This is only an approximation and does not take into account things such as pre-allocation in hashmaps.
Defaults to None
, i.e. no limit.
flush_partitions: Option<u32>
The number of logical partitions that can receive flushed buckets.
flush_batching: FlushBatching
The batching mode for the flushing of the aggregator.
Batching is applied via shifts to the flushing time that is determined when the first bucket is inserted. Thanks to the shifts, Relay is able to prevent flushing all buckets from a bucket interval at the same time.
For example, the aggregator can choose to shift by the same value all buckets within a given partition, effectively allowing all the elements of that partition to be flushed together.
Trait Implementations§
source§impl Clone for AggregatorConfig
impl Clone for AggregatorConfig
source§fn clone(&self) -> AggregatorConfig
fn clone(&self) -> AggregatorConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AggregatorConfig
impl Debug for AggregatorConfig
source§impl Default for AggregatorConfig
impl Default for AggregatorConfig
source§impl<'de> Deserialize<'de> for AggregatorConfigwhere
AggregatorConfig: Default,
impl<'de> Deserialize<'de> for AggregatorConfigwhere
AggregatorConfig: Default,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for AggregatorConfig
impl RefUnwindSafe for AggregatorConfig
impl Send for AggregatorConfig
impl Sync for AggregatorConfig
impl Unpin for AggregatorConfig
impl UnwindSafe for AggregatorConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more