Struct relay_metrics::BucketMetadata
source · 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 moresource§impl Debug for BucketMetadata
impl Debug for BucketMetadata
source§impl Default for BucketMetadata
impl Default for BucketMetadata
source§impl<'de> Deserialize<'de> for BucketMetadata
impl<'de> Deserialize<'de> for BucketMetadata
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>,
source§impl PartialEq for BucketMetadata
impl PartialEq for BucketMetadata
source§fn eq(&self, other: &BucketMetadata) -> bool
fn eq(&self, other: &BucketMetadata) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for BucketMetadata
impl Serialize for BucketMetadata
impl Copy for BucketMetadata
impl StructuralPartialEq for BucketMetadata
Auto Trait Implementations§
impl Freeze for BucketMetadata
impl RefUnwindSafe for BucketMetadata
impl Send for BucketMetadata
impl Sync for BucketMetadata
impl Unpin for BucketMetadata
impl UnwindSafe for BucketMetadata
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)