-
Notifications
You must be signed in to change notification settings - Fork 94
Reduce metrics cardinality and limit some metrics to debug builds #3638
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
Conversation
Test Results 7 files ±0 7 suites ±0 3m 40s ⏱️ -6s For more details on these errors, see this check. Results for commit fb00afb. ± Comparison against base commit bb835b4. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! +1 for merging.
#[cfg(debug_assertions)] | ||
let labels = [("runtime", runtime.clone())]; | ||
#[cfg(debug_assertions)] | ||
gauge!("restate.tokio.num_workers", &labels).set(stats.num_workers() as f64); | ||
#[cfg(debug_assertions)] | ||
gauge!("restate.tokio.blocking_threads", &labels).set(stats.num_blocking_threads() as f64); | ||
#[cfg(debug_assertions)] | ||
gauge!("restate.tokio.blocking_queue_depth", &labels).set(stats.blocking_queue_depth() as f64); | ||
#[cfg(debug_assertions)] | ||
gauge!("restate.tokio.num_alive_tasks", &labels).set(stats.num_alive_tasks() as f64); | ||
#[cfg(debug_assertions)] | ||
gauge!("restate.tokio.io_driver_ready_count", &labels) | ||
.set(stats.io_driver_ready_count() as f64); | ||
gauge!("restate.tokio.remote_schedule_count", "runtime" => runtime.clone()) | ||
.set(stats.remote_schedule_count() as f64); | ||
#[cfg(debug_assertions)] | ||
counter!("restate.tokio.remote_schedule_count", &labels) | ||
.absolute(stats.remote_schedule_count()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe group everything in a closure like
#[cfg(debug_assertion)]
{
gauge!(..);
...
}
This has been causing memory leak if it's set to zero so we are removing and it can be later re-introduced if its underlying issues are fixed.
Stack created with Sapling. Best reviewed with ReviewStack.