-
Notifications
You must be signed in to change notification settings - Fork 704
feat: add barrier latency monitor #553
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
rust/meta/src/rpc/metrics.rs
Outdated
| } | ||
| lazy_static::lazy_static! { | ||
| pub static ref | ||
| DEFAULT_META_STATS: Arc<MetaMetrics> = Arc::new(MetaMetrics::new()); |
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.
Don't use lazy_static in meta metrics. The metrics in meta service is designed to not affect the global scope. We should also later refactor compute node.
rust/meta/src/barrier/mod.rs
Outdated
|
|
||
| /// When `buffer` is not empty anymore, all subscribers of this watcher will be notified. | ||
| changed_tx: watch::Sender<()>, | ||
| metrics: Arc<MetaMetrics>, |
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.
Should move to BarrierManager.
skyzh
left a comment
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
| let buckets = BARRIER_BUCKETS; | ||
| let opts = histogram_opts!( | ||
| "meta_barrier_duration_seconds", | ||
| "barrier latency ", |
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.
extra space?
rust/meta/src/rpc/metrics.rs
Outdated
| let opts = histogram_opts!( | ||
| "meta_barrier_duration_seconds", | ||
| "barrier latency ", | ||
| buckets.iter().map(|x| *x * 0.1).collect_vec() |
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.
As we define BARRIER_BUCKETS manually, do we still need to *0.1 here?
rust/meta/src/rpc/metrics.rs
Outdated
| "meta_grpc_duration_seconds", | ||
| "gRPC latency of meta services", | ||
| buckets.iter().map(|x| *x * 0.1).collect_vec() | ||
| buckets.iter().map(|x| *x * 1.0).collect_vec() |
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.
remove map.
|
|
||
| /// gRPC latency of meta services | ||
| pub grpc_latency: HistogramVec, | ||
| pub barrier_latency: Histogram, |
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.
Add docstring for this field.
|
Suggest attaching a grafana/tracing screenshot within a PR regarding monitoring/metrics. 😄 |
* add barrier monitor * fix * fix * x * x
What's changed and what's your intention?
PLEASE DO NOT LEAVE THIS EMPTY !!!
Please explain IN DETAIL what the changes are in this PR and why they are needed:
Summarize your change (mandatory)
This PR adds barrier latency monitor, and updates the corresponding grafana dashboards.
How does this PR work? Need a brief introduction for the changed logic (optional)
Describe clearly one logical change and avoid lazy messages (optional)
Describe any limitations of the current code (optional)
Checklist
Refer to a related PR or issue link (optional)