Skip to content

Commit

Permalink
ref(metrics): Create extracted metrics summary for sets with min/max/…
Browse files Browse the repository at this point in the history
…sum of 0
  • Loading branch information
Dav1dde committed Jul 23, 2024
1 parent 3f03ac2 commit 294d48d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions relay-server/src/metrics_extraction/metrics_summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ impl<'a> From<&'a SetValue> for MetricsSummaryBucketValue {
fn from(set: &'a SetValue) -> Self {
// For sets, we limit to counting the number of occurrences.
MetricsSummaryBucketValue {
min: None,
max: None,
sum: None,
min: Some(0.into()),
max: Some(0.into()),
sum: Some(0.into()),
count: set.len() as u64,
}
}
Expand Down Expand Up @@ -342,18 +342,18 @@ mod tests {
{
"s:custom/my_set@none": [
MetricSummary {
min: ~,
max: ~,
sum: ~,
min: 0.0,
max: 0.0,
sum: 0.0,
count: 2,
tags: {
"platform": "android",
},
},
MetricSummary {
min: ~,
max: ~,
sum: ~,
min: 0.0,
max: 0.0,
sum: 0.0,
count: 2,
tags: {
"platform": "ios",
Expand Down Expand Up @@ -458,9 +458,9 @@ mod tests {
],
"s:custom/my_set@none": [
MetricSummary {
min: ~,
max: ~,
sum: ~,
min: 0.0,
max: 0.0,
sum: 0.0,
count: 4,
tags: {
"platform": "ios",
Expand Down

0 comments on commit 294d48d

Please sign in to comment.