From 28e591eaf33de83d4d6353e9c40e3a4237840458 Mon Sep 17 00:00:00 2001 From: David Herberth Date: Thu, 2 Nov 2023 16:05:45 +0100 Subject: [PATCH] minor fixes --- relay-metrics/src/view.rs | 6 +++--- relay-server/src/actors/envelopes.rs | 2 +- relay-server/src/actors/project.rs | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/relay-metrics/src/view.rs b/relay-metrics/src/view.rs index 074cb36da47..9e132b35f59 100644 --- a/relay-metrics/src/view.rs +++ b/relay-metrics/src/view.rs @@ -10,7 +10,7 @@ use std::ops::Range; use crate::bucket::Bucket; use crate::BucketValue; -/// The fraction of [`AggregatorServiceConfig::max_flush_bytes`] at which buckets will be split. A value of +/// The fraction of [`crate::AggregatorServiceConfig::max_flush_bytes`] at which buckets will be split. A value of /// `2` means that all buckets smaller than half of max_flush_bytes will be moved in their entirety, /// and buckets larger will be split up. const BUCKET_SPLIT_FACTOR: usize = 32; @@ -32,7 +32,7 @@ struct Index { /// A view into a slice of metric buckets. /// /// The view can be used to iterate over a large slice -/// of metric data slicing even into the buckets themselfs. +/// of metric data slicing even into the buckets themselves. /// /// ```txt /// Full View @@ -197,7 +197,7 @@ impl<'a> Iterator for BucketsViewBySizeIter<'a> { } // Select next potential bucket, - // this won't overflow because `end` will never go past the slice and, + // this won't overflow because `end` will never go past the slice and // we just validated that current is constrained by end. let bucket = &self.inner[self.current.slice]; let bucket = BucketView::new(bucket).select(self.current.bucket..bucket.value.len()); diff --git a/relay-server/src/actors/envelopes.rs b/relay-server/src/actors/envelopes.rs index 4ca2003685d..543f9ba993e 100644 --- a/relay-server/src/actors/envelopes.rs +++ b/relay-server/src/actors/envelopes.rs @@ -374,7 +374,7 @@ impl EnvelopeManagerService { }); } - while let Some(_) = futures.next().await {} + while futures.next().await.is_some() {} } async fn handle_send_client_reports(&self, message: SendClientReports) { diff --git a/relay-server/src/actors/project.rs b/relay-server/src/actors/project.rs index d0ec3e48175..d487b3f0c3c 100644 --- a/relay-server/src/actors/project.rs +++ b/relay-server/src/actors/project.rs @@ -595,8 +595,7 @@ impl Project { MetricNamespace::Sessions => true, MetricNamespace::Transactions => true, MetricNamespace::Spans => state.has_feature(Feature::SpanMetricsExtraction), - // TODO MetricNamespace::Custom => state.has_feature(Feature::CustomMetrics), - MetricNamespace::Custom => true, + MetricNamespace::Custom => state.has_feature(Feature::CustomMetrics), MetricNamespace::Unsupported => false, };