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 @@
sourcepub fn cogs_granularity(&self) -> Duration
pub fn cogs_granularity(&self) -> Duration
Granularity for COGS measurements.
sourcepub fn cogs_max_queue_size(&self) -> u64
pub fn cogs_max_queue_size(&self) -> u64
Maximum amount of COGS measurements buffered in memory.
sourcepub fn cogs_relay_resource_id(&self) -> &str
pub fn cogs_relay_resource_id(&self) -> &str
Resource ID to use for Relay COGS measurements.
-sourcepub fn permissive_aggregator_config(&self) -> AggregatorConfig
pub fn permissive_aggregator_config(&self) -> AggregatorConfig
Creates an [AggregatorConfig
] that is compatible with every other aggregator.
sourcepub fn permissive_aggregator_config(&self) -> AggregatorConfig
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.
sourcepub fn default_aggregator_config(&self) -> &AggregatorServiceConfig
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 @@ -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.
+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.
//! 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",
}
}
}