From 7156bf3405d35492f4dc6d39ba2abb03f4d50e21 Mon Sep 17 00:00:00 2001 From: Dav1dde Date: Fri, 19 Jul 2024 10:40:09 +0000 Subject: [PATCH] deploy: 4e666e1db0b71c8c0d54510135b61d464ea0bcad --- .../struct.AggregatorServiceConfig.html | 4 +- relay_config/struct.Config.html | 2 +- relay_spans/fn.otel_to_sentry_span.html | 2 +- src/relay_server/services/store.rs.html | 40 ++++++++++++++++--- src/relay_server/statsd.rs.html | 16 ++++++++ 5 files changed, 54 insertions(+), 10 deletions(-) diff --git a/relay_config/aggregator/struct.AggregatorServiceConfig.html b/relay_config/aggregator/struct.AggregatorServiceConfig.html index 2e7f25a7ee..81dfd82ea3 100644 --- a/relay_config/aggregator/struct.AggregatorServiceConfig.html +++ b/relay_config/aggregator/struct.AggregatorServiceConfig.html @@ -1,10 +1,10 @@ AggregatorServiceConfig in relay_config::aggregator - Rust

Struct relay_config::aggregator::AggregatorServiceConfig

source ·
pub struct AggregatorServiceConfig {
-    pub aggregator: AggregatorConfig,
+    pub aggregator: AggregatorConfig,
     pub max_total_bucket_bytes: Option<usize>,
     pub max_flush_bytes: usize,
     pub flush_interval_ms: u64,
 }
Expand description

Parameters used for metric aggregation.

-

Fields§

§aggregator: AggregatorConfig

The config used by the internal aggregator.

+

Fields§

§aggregator: AggregatorConfig

The config used by the internal aggregator.

§max_total_bucket_bytes: Option<usize>

Maximum amount of bytes used for metrics aggregation.

When aggregating metrics, Relay keeps track of how many bytes a metric takes in memory. This is only an approximation and does not take into account things such as pre-allocation diff --git a/relay_config/struct.Config.html b/relay_config/struct.Config.html index acc5c6ba55..ab5c2f5fb1 100644 --- a/relay_config/struct.Config.html +++ b/relay_config/struct.Config.html @@ -157,7 +157,7 @@

source

pub fn cogs_granularity(&self) -> Duration

Granularity for COGS measurements.

source

pub fn cogs_max_queue_size(&self) -> u64

Maximum amount of COGS measurements buffered in memory.

source

pub fn cogs_relay_resource_id(&self) -> &str

Resource ID to use for Relay COGS measurements.

-
source

pub fn permissive_aggregator_config(&self) -> AggregatorConfig

Creates an [AggregatorConfig] that is compatible with every other aggregator.

+
source

pub fn permissive_aggregator_config(&self) -> AggregatorConfig

Creates an AggregatorConfig that is compatible with every other aggregator.

A lossless aggregator can be put in front of any of the configured aggregators without losing data that the configured aggregator would keep. This is useful for pre-aggregating metrics together in a single aggregator instance.

source

pub fn default_aggregator_config(&self) -> &AggregatorServiceConfig

Returns configuration for the default metrics aggregator.

diff --git a/relay_spans/fn.otel_to_sentry_span.html b/relay_spans/fn.otel_to_sentry_span.html index d3b789fc70..ca3aacb97c 100644 --- a/relay_spans/fn.otel_to_sentry_span.html +++ b/relay_spans/fn.otel_to_sentry_span.html @@ -1,2 +1,2 @@ -otel_to_sentry_span in relay_spans - Rust

Function relay_spans::otel_to_sentry_span

source ·
pub fn otel_to_sentry_span(otel_span: Span) -> Span
Expand description

Transform an OtelSpan to a Sentry span.

+otel_to_sentry_span in relay_spans - Rust

Function relay_spans::otel_to_sentry_span

source ·
pub fn otel_to_sentry_span(otel_span: Span) -> Span
Expand description

Transform an OtelSpan to a Sentry span.

\ No newline at end of file diff --git a/src/relay_server/services/store.rs.html b/src/relay_server/services/store.rs.html index 1401cb8348..1f8b5a5cac 100644 --- a/src/relay_server/services/store.rs.html +++ b/src/relay_server/services/store.rs.html @@ -1621,6 +1621,20 @@ 1621 1622 1623 +1624 +1625 +1626 +1627 +1628 +1629 +1630 +1631 +1632 +1633 +1634 +1635 +1636 +1637
//! This module contains the service that forwards events and attachments to the Sentry store.
 //! The service uses Kafka topics to forward data to Sentry
 
@@ -1658,7 +1672,7 @@
 use crate::services::global_config::GlobalConfigHandle;
 use crate::services::outcome::{DiscardReason, Outcome, TrackOutcome};
 use crate::services::processor::Processed;
-use crate::statsd::RelayCounters;
+use crate::statsd::{RelayCounters, RelayTimers};
 use crate::utils::{is_rolled_out, FormDataIter, TypedEnvelope};
 
 /// Fallback name used for attachment items without a `filename` header.
@@ -1724,6 +1738,17 @@
     Cogs(StoreCogs),
 }
 
+impl Store {
+    /// Returns the name of the message variant.
+    fn variant(&self) -> &'static str {
+        match self {
+            Store::Envelope(_) => "envelope",
+            Store::Metrics(_) => "metrics",
+            Store::Cogs(_) => "cogs",
+        }
+    }
+}
+
 impl Interface for Store {}
 
 impl FromMessage<StoreEnvelope> for Store {
@@ -1777,11 +1802,14 @@
     }
 
     fn handle_message(&self, message: Store) {
-        match message {
-            Store::Envelope(message) => self.handle_store_envelope(message),
-            Store::Metrics(message) => self.handle_store_metrics(message),
-            Store::Cogs(message) => self.handle_store_cogs(message),
-        }
+        let ty = message.variant();
+        relay_statsd::metric!(timer(RelayTimers::StoreServiceDuration), message = ty, {
+            match message {
+                Store::Envelope(message) => self.handle_store_envelope(message),
+                Store::Metrics(message) => self.handle_store_metrics(message),
+                Store::Cogs(message) => self.handle_store_cogs(message),
+            }
+        })
     }
 
     fn handle_store_envelope(&self, message: StoreEnvelope) {
diff --git a/src/relay_server/statsd.rs.html b/src/relay_server/statsd.rs.html
index 194a0d6d1d..1b87ffe999 100644
--- a/src/relay_server/statsd.rs.html
+++ b/src/relay_server/statsd.rs.html
@@ -918,6 +918,14 @@
 918
 919
 920
+921
+922
+923
+924
+925
+926
+927
+928
 
use relay_statsd::{CounterMetric, GaugeMetric, HistogramMetric, TimerMetric};
 #[cfg(doc)]
 use tokio::runtime::RuntimeMetrics;
@@ -1447,6 +1455,12 @@
     /// This metric is tagged with:
     ///  - `message`: The type of message that was processed.
     MetricRouterServiceDuration,
+    /// Timing in milliseconds for processing a message in the metric store service.
+    ///
+    /// This metric is tagged with:
+    ///  - `message`: The type of message that was processed.
+    #[cfg(feature = "processing")]
+    StoreServiceDuration,
 }
 
 impl TimerMetric for RelayTimers {
@@ -1486,6 +1500,8 @@
             RelayTimers::RateLimitBucketsDuration => "processor.rate_limit_buckets",
             RelayTimers::AggregatorServiceDuration => "metrics.aggregator.message.duration",
             RelayTimers::MetricRouterServiceDuration => "metrics.router.message.duration",
+            #[cfg(feature = "processing")]
+            RelayTimers::StoreServiceDuration => "store.message.duration",
         }
     }
 }