apollo_network_benchmark: added network event metrics#11547
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. |
0e49478 to
7137381
Compare
9fa62de to
5261825
Compare
5261825 to
f6b5f12
Compare
7137381 to
9f1fb1f
Compare
| MetricCounter { NETWORK_STRESS_TEST_RECEIVED_MESSAGES, "network_stress_test_received_messages", "Number of stress test messages received via broadcast", init = 0 }, | ||
| LabeledMetricCounter { NETWORK_DROPPED_BROADCAST_MESSAGES, "network_dropped_broadcast_messages", "Number of dropped broadcast messages by reason", init = 0, labels = NETWORK_BROADCAST_DROP_LABELS }, | ||
| LabeledMetricCounter { NETWORK_EVENT_COUNTER, "network_event_counter", "Network events counter by type", init = 0, labels = EVENT_TYPE_LABELS }, | ||
|
|
There was a problem hiding this comment.
New event counter metric never gets registered
Medium Severity
The new NETWORK_EVENT_COUNTER metric is never registered. During NetworkManager::new(), the event_metrics field is take()n from NetworkMetrics and moved into MixedBehaviour, so when NetworkMetrics::register() runs later in run(), event_metrics is already None and the counter isn't registered. The register_metrics() function also doesn't include NETWORK_EVENT_COUNTER.register(). Other components like apollo_consensus_manager handle this by explicitly registering their event counter in their register_metrics().
Additional Locations (1)
9f1fb1f to
ce5b018
Compare
f6b5f12 to
0789a94
Compare
ce5b018 to
74f56ff
Compare
0789a94 to
21df92c
Compare



Note
Low Risk
Low risk: adds a new labeled counter metric and plumbs it into the existing
NetworkMetricsstruct without changing networking behavior or data handling.Overview
Adds a new labeled counter,
NETWORK_EVENT_COUNTER(network_event_counter), to the broadcast network stress test node metrics, usingEVENT_TYPE_LABELS.Updates
create_network_metricsto constructEventMetricsand pass it viaNetworkMetrics.event_metrics(previouslyNone), enabling event-type network telemetry during the benchmark.Written by Cursor Bugbot for commit 21df92c. This will update automatically on new commits. Configure here.