-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Several metrics changes #5123
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
base: 11-28-make_notification_and_cross_chain_queue_sizes_grow_with_network_size
Are you sure you want to change the base?
Several metrics changes #5123
Conversation
58b94ab to
8b41b5a
Compare
8b41b5a to
bb38573
Compare
bb38573 to
26e0c2b
Compare
8680174 to
241959f
Compare
26e0c2b to
c0eced0
Compare
c0eced0 to
73b4c94
Compare
| // Put back the sender in the cache for next time. | ||
| chain_workers.insert(chain_id, sender); | ||
| #[cfg(with_metrics)] | ||
| metrics::CHAIN_WORKER_ENDPOINTS_CACHED.set(chain_workers.len() as i64); |
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.
Will this decrement properly as chain workers are removed from the cache? i.e. is this the only place where workers are being evicted? Or can they be also dropped elsewhere (and we'd get outdated values in metrics).
| ) | ||
| }); | ||
|
|
||
| /// Number of cached chain worker channel endpoints in the BTreeMap. |
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.
| /// Number of cached chain worker channel endpoints in the BTreeMap. | |
| /// Number of cached chain worker channel endpoints in the `BTreeMap`. |
(or: "in the map"?)
| ) -> Result<(ChainInfoResponse, NetworkActions), WorkerError> { | ||
| trace!("{} <-- {:?}", self.nickname, certificate); | ||
| #[cfg(with_metrics)] | ||
| let metrics_data = ( |
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.
Let's introduce a struct MetricsData for that, and make this line just:
let metrics_data = MetricsData::new(&certificate);| #[cfg(with_metrics)] | ||
| { | ||
| if matches!(_outcome, BlockOutcome::Processed) { | ||
| let ( |
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.
…then we could just call something like metrics_data.record() here. (Or log? gather? update?)

Motivation
Several metrics improvements were needed:
Proposal
chain_worker_request_queue_wait_timehistogram metricTest Plan
Release Plan