From 5627a7013e284ffeafa4094dccea00e7ddc75544 Mon Sep 17 00:00:00 2001 From: Joris Bayer Date: Fri, 13 Sep 2024 08:37:24 +0200 Subject: [PATCH 1/2] instr(buffer): More metrics --- relay-server/src/services/buffer/mod.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/relay-server/src/services/buffer/mod.rs b/relay-server/src/services/buffer/mod.rs index 0a011bfe25..a3f6a8a53b 100644 --- a/relay-server/src/services/buffer/mod.rs +++ b/relay-server/src/services/buffer/mod.rs @@ -147,9 +147,21 @@ impl EnvelopeBufferService { ); self.system_ready(buffer).await; + + relay_statsd::metric!( + counter(RelayCounters::BufferReadyToPop) += 1, + status = "system_ready" + ); + if self.sleep > Duration::ZERO { tokio::time::sleep(self.sleep).await; } + + relay_statsd::metric!( + counter(RelayCounters::BufferReadyToPop) += 1, + status = "slept" + ); + if let Some(project_cache_ready) = self.project_cache_ready.as_mut() { project_cache_ready.await?; self.project_cache_ready = None; From 3269fb7e370e156df9882dc0b802e65112cb966e Mon Sep 17 00:00:00 2001 From: Joris Bayer Date: Fri, 13 Sep 2024 08:46:15 +0200 Subject: [PATCH 2/2] more --- relay-server/src/services/buffer/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/relay-server/src/services/buffer/mod.rs b/relay-server/src/services/buffer/mod.rs index a3f6a8a53b..1955642c8b 100644 --- a/relay-server/src/services/buffer/mod.rs +++ b/relay-server/src/services/buffer/mod.rs @@ -163,7 +163,15 @@ impl EnvelopeBufferService { ); if let Some(project_cache_ready) = self.project_cache_ready.as_mut() { + relay_statsd::metric!( + counter(RelayCounters::BufferReadyToPop) += 1, + status = "waiting_for_project_cache" + ); project_cache_ready.await?; + relay_statsd::metric!( + counter(RelayCounters::BufferReadyToPop) += 1, + status = "waited_for_project_cache" + ); self.project_cache_ready = None; }