@@ -67,7 +67,7 @@ use crate::services::projects::project::{ProjectInfo, ProjectState};
6767use crate :: services:: upstream:: {
6868 SendRequest , Sign , SignatureType , UpstreamRelay , UpstreamRequest , UpstreamRequestError ,
6969} ;
70- use crate :: statsd:: { RelayCounters , RelayHistograms , RelayTimers } ;
70+ use crate :: statsd:: { RelayCounters , RelayDistributions , RelayTimers } ;
7171use crate :: utils:: { self , CheckLimits , EnvelopeLimiter , SamplingResult } ;
7272use crate :: { http, processing} ;
7373use relay_threading:: AsyncPool ;
@@ -2770,7 +2770,7 @@ impl EnvelopeProcessorService {
27702770 let dsn = PartialDsn :: outbound ( scoping, upstream) ;
27712771
27722772 relay_statsd:: metric!(
2773- histogram ( RelayHistograms :: PartitionKeys ) = u64 :: from( partition_key)
2773+ distribution ( RelayDistributions :: PartitionKeys ) = u64 :: from( partition_key)
27742774 ) ;
27752775
27762776 let mut num_batches = 0 ;
@@ -2789,14 +2789,16 @@ impl EnvelopeProcessorService {
27892789 . scope ( * scoping) ;
27902790
27912791 relay_statsd:: metric!(
2792- histogram ( RelayHistograms :: BucketsPerBatch ) = batch. len( ) as u64
2792+ distribution ( RelayDistributions :: BucketsPerBatch ) = batch. len( ) as u64
27932793 ) ;
27942794
27952795 self . submit_upstream ( cogs, Submit :: Envelope ( envelope. into_processed ( ) ) ) ;
27962796 num_batches += 1 ;
27972797 }
27982798
2799- relay_statsd:: metric!( histogram( RelayHistograms :: BatchesPerPartition ) = num_batches) ;
2799+ relay_statsd:: metric!(
2800+ distribution( RelayDistributions :: BatchesPerPartition ) = num_batches
2801+ ) ;
28002802 }
28012803 }
28022804
@@ -2874,7 +2876,7 @@ impl EnvelopeProcessorService {
28742876 }
28752877
28762878 if partition_splits > 0 {
2877- metric ! ( histogram ( RelayHistograms :: PartitionSplits ) = partition_splits) ;
2879+ metric ! ( distribution ( RelayDistributions :: PartitionSplits ) = partition_splits) ;
28782880 }
28792881
28802882 self . send_global_partition ( partition_key, & mut partition) ;
@@ -3139,7 +3141,9 @@ impl UpstreamRequest for SendEnvelope {
31393141
31403142 fn build ( & mut self , builder : & mut http:: RequestBuilder ) -> Result < ( ) , http:: HttpError > {
31413143 let envelope_body = self . body . clone ( ) ;
3142- metric ! ( histogram( RelayHistograms :: UpstreamEnvelopeBodySize ) = envelope_body. len( ) as u64 ) ;
3144+ metric ! (
3145+ distribution( RelayDistributions :: UpstreamEnvelopeBodySize ) = envelope_body. len( ) as u64
3146+ ) ;
31433147
31443148 let meta = & self . envelope . meta ( ) ;
31453149 let shard = self . envelope . partition_key ( ) . map ( |p| p. to_string ( ) ) ;
@@ -3355,7 +3359,9 @@ impl UpstreamRequest for SendMetricsRequest {
33553359 }
33563360
33573361 fn build ( & mut self , builder : & mut http:: RequestBuilder ) -> Result < ( ) , http:: HttpError > {
3358- metric ! ( histogram( RelayHistograms :: UpstreamMetricsBodySize ) = self . encoded. len( ) as u64 ) ;
3362+ metric ! (
3363+ distribution( RelayDistributions :: UpstreamMetricsBodySize ) = self . encoded. len( ) as u64
3364+ ) ;
33593365
33603366 builder
33613367 . content_encoding ( self . http_encoding )
0 commit comments