Skip to content

Commit

Permalink
instr(buffer): More metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
jjbayer committed Sep 13, 2024
1 parent c08c634 commit 5627a70
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions relay-server/src/services/buffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5627a70

Please sign in to comment.