pub struct AggregatorServiceConfig {
Show 14 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 max_flush_bytes: usize, pub flush_partitions: Option<u64>, pub flush_batching: FlushBatching, pub flush_interval_ms: 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.

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

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

§flush_interval_ms: u64

The flushing interval in milliseconds that determines how often the aggregator is polled for flushing new buckets.

Defaults to 100 milliseconds.

Trait Implementations§

source§

impl Clone for AggregatorServiceConfig

source§

fn clone(&self) -> AggregatorServiceConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AggregatorServiceConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AggregatorServiceConfig

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AggregatorServiceConfig

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<&AggregatorServiceConfig> for AggregatorConfig

source§

fn from(value: &AggregatorServiceConfig) -> Self

Converts to this type from the input type.
source§

impl Serialize for AggregatorServiceConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,