apollo_network_benchmark: added network metrics to network manager#11544
Conversation
|
There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale. |
2aae34d to
ca949d1
Compare
bc15f6a to
602db52
Compare
ca949d1 to
3b2e887
Compare
602db52 to
3731f9f
Compare
3b2e887 to
64fc04b
Compare
3731f9f to
15e099b
Compare
| MetricHistogram { RECEIVE_MESSAGE_DELAY_SECONDS, "receive_message_delay_seconds", "Message delay in seconds" }, | ||
|
|
||
| MetricGauge { NETWORK_CONNECTED_PEERS, "network_connected_peers", "Number of connected peers in the network" }, | ||
| MetricGauge { NETWORK_BLACKLISTED_PEERS, "network_blacklisted_peers", "Number of blacklisted peers in the network" }, |
There was a problem hiding this comment.
New network metrics not registered in register_metrics
Medium Severity
The newly added NETWORK_CONNECTED_PEERS and NETWORK_BLACKLISTED_PEERS gauge metrics are defined and passed to the NetworkManager via create_network_metrics(), but register_metrics() was not updated to call .register() on them. Every other metric follows this pattern. Without registration, these metrics won't be exported by the Prometheus exporter, making the new network metrics silently invisible.
Additional Locations (1)
| MetricHistogram { RECEIVE_MESSAGE_DELAY_SECONDS, "receive_message_delay_seconds", "Message delay in seconds" }, | ||
|
|
||
| MetricGauge { NETWORK_CONNECTED_PEERS, "network_connected_peers", "Number of connected peers in the network" }, | ||
| MetricGauge { NETWORK_BLACKLISTED_PEERS, "network_blacklisted_peers", "Number of blacklisted peers in the network" }, |
There was a problem hiding this comment.
New network metrics not registered in register_metrics
Medium Severity
The newly added NETWORK_CONNECTED_PEERS and NETWORK_BLACKLISTED_PEERS gauge metrics are defined in the define_metrics! macro and used in create_network_metrics(), but register_metrics() was not updated to call .register() on them. Every other metric in this file has a corresponding .register() call. Without registration, these metrics won't be exported or visible in monitoring.
Additional Locations (1)
15e099b to
9f2229a
Compare
64fc04b to
8c425d7
Compare
8c425d7 to
bd37dd8
Compare
9f2229a to
3e36182
Compare
3e36182 to
f546ac1
Compare



Note
Low Risk
Adds metrics wiring and two new gauges without changing networking behavior or message flow; risk is limited to metric registration/collection correctness.
Overview
The broadcast network stress test node now initializes
NetworkManagerwith a minimalNetworkMetricsinstance, enabling collection of network-level metrics during runs.This adds two new gauges (
network_connected_peers,network_blacklisted_peers) and a helper (create_network_metrics) that wires them into the manager while leaving other network metric groups unset (None).Written by Cursor Bugbot for commit f546ac1. This will update automatically on new commits. Configure here.