Struct relay_metrics::AggregatorServiceConfig
source · pub struct AggregatorServiceConfig {Show 13 fields
pub max_total_bucket_bytes: Option<usize>,
pub bucket_interval: u64,
pub initial_delay: u64,
pub debounce_delay: u64,
pub max_secs_in_past: u64,
pub max_secs_in_future: u64,
pub max_name_length: usize,
pub max_tag_key_length: usize,
pub max_tag_value_length: usize,
pub max_project_key_bucket_bytes: Option<usize>,
pub shift_key: ShiftKey,
pub max_flush_bytes: usize,
pub flush_partitions: Option<u64>,
}
Expand description
Parameters used by the AggregatorService
.
Fields§
§max_total_bucket_bytes: Option<usize>
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.
bucket_interval: u64
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.
initial_delay: u64
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. This should be higher than the
debounce_delay
.
Relay applies up to a full bucket_interval
of additional jitter after the initial delay to spread out flushing real time buckets.
debounce_delay: u64
The delay in seconds to wait before flushing a backdated buckets.
Defaults to 10
seconds. Metrics can be sent with a past timestamp. Relay wait this time
before sending such a backdated bucket to the upsteam. This should be lower than
initial_delay
.
Unlike initial_delay
, the debounce delay starts with the exact moment the first metric
is added to a backdated bucket.
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_name_length: usize
The length the name of a metric is allowed to be.
Defaults to 200
bytes.
max_tag_key_length: usize
The length the tag key is allowed to be.
Defaults to 200
bytes.
max_tag_value_length: usize
The length the tag value is allowed to be.
Defaults to 200
chars.
max_project_key_bucket_bytes: Option<usize>
Maximum amount of bytes used for metrics aggregation per project key.
Similar measuring technique to 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.
shift_key: ShiftKey
Key used to shift the flush time of a bucket.
This prevents flushing all buckets from a bucket interval at the same time by computing an offset from the hash of the given key.
max_flush_bytes: usize
The approximate maximum number of bytes submitted within one flush cycle.
This controls how big flushed batches of buckets get, depending on the number of buckets, the cumulative length of their keys, and the number of raw values. Since final serialization adds some additional overhead, this number is approxmate and some safety margin should be left to hard limits.
flush_partitions: Option<u64>
The number of logical partitions that can receive flushed buckets.
If set, buckets are partitioned by (bucket key % flush_partitions), and routed
by setting the header X-Sentry-Relay-Shard
.
Trait Implementations§
source§impl Clone for AggregatorServiceConfig
impl Clone for AggregatorServiceConfig
source§fn clone(&self) -> AggregatorServiceConfig
fn clone(&self) -> AggregatorServiceConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more