pub struct BucketMetadata {
pub merges: u32,
pub received_at: Option<UnixTimestamp>,
pub extracted_from_indexed: bool,
}
Expand description
Relay internal metadata for a metric bucket.
Fields§
§merges: u32
How many times the bucket was merged.
Creating a new bucket is the first merge. Merging two buckets sums the amount of merges.
For example: Merging two un-merged buckets will yield a total
of 2
merges.
Due to how Relay aggregates metrics and later splits them into multiple
buckets again, the amount of merges can be zero.
When splitting a bucket the total volume of the bucket may only be attributed
to one part or distributed across the resulting buckets, in either case
values of 0
are possible.
received_at: Option<UnixTimestamp>
Received timestamp of the first metric in this bucket.
This field should be set to the time in which the first metric of a specific bucket was received in the outermost internal Relay.
extracted_from_indexed: bool
Is true
if this metric was extracted from a sampled/indexed envelope item.
The final dynamic sampling decision is always made in processing Relays.
If a metric was extracted from an item which is sampled (i.e. retained by dynamic sampling), this flag is true
.
Since these metrics from samples carry additional information, e.g. they don’t require rate limiting since the sample they’ve been extracted from was already rate limited, this flag must be included in the aggregation key when aggregation buckets.
Implementations§
Source§impl BucketMetadata
impl BucketMetadata
Sourcepub fn new(received_at: UnixTimestamp) -> Self
pub fn new(received_at: UnixTimestamp) -> Self
Creates a fresh metadata instance.
The new metadata is initialized with 1
merge and a given received_at
timestamp.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Whether the metadata does not contain more information than the default.
Trait Implementations§
Source§impl Clone for BucketMetadata
impl Clone for BucketMetadata
Source§fn clone(&self) -> BucketMetadata
fn clone(&self) -> BucketMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more