Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(metric-stats): Emit accepted volume #3281

Merged
merged 7 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
lints and better docs
  • Loading branch information
Dav1dde committed Mar 19, 2024
commit 131093ae3477a2563e0d109c9ef222359733f86e
2 changes: 2 additions & 0 deletions relay-metrics/src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ impl<'a> BucketView<'a> {
}

/// Returns the name of the bucket.
Dav1dde marked this conversation as resolved.
Show resolved Hide resolved
///
/// Caller holds shared ownership of the string.
pub fn clone_name(&self) -> Arc<str> {
Arc::clone(&self.inner.name)
}
Expand Down
1 change: 1 addition & 0 deletions relay-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ mod endpoints;
mod envelope;
mod extractors;
mod http;
#[cfg(feature = "processing")]
mod metric_stats;
mod metrics_extraction;
mod middlewares;
Expand Down
4 changes: 3 additions & 1 deletion relay-server/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use relay_redis::RedisPool;
use relay_system::{channel, Addr, Service};
use tokio::runtime::Runtime;

#[cfg(feature = "processing")]
use crate::metric_stats::MetricStats;
use crate::services::cogs::{CogsService, CogsServiceRecorder};
use crate::services::global_config::{GlobalConfigManager, GlobalConfigService};
Expand Down Expand Up @@ -137,6 +138,7 @@ impl ServiceState {
)
.start_in(&runtimes.aggregator);

#[cfg(feature = "processing")]
let metric_stats = MetricStats::new(
config.clone(),
global_config_handle.clone(),
Expand All @@ -150,7 +152,7 @@ impl ServiceState {
config.clone(),
global_config_handle.clone(),
outcome_aggregator.clone(),
metric_stats.clone(),
metric_stats,
)?
.start_in(rt),
),
Expand Down
Loading