Skip to content

apollo_network_benchmark: added network metrics to network manager#11544

Closed
sirandreww-starkware wants to merge 1 commit into01-07-apollo_network_benchmark_added_broadcast_metrics_trackingfrom
01-07-apollo_network_benchmark_added_network_metrics_to_network_manager
Closed

apollo_network_benchmark: added network metrics to network manager#11544
sirandreww-starkware wants to merge 1 commit into01-07-apollo_network_benchmark_added_broadcast_metrics_trackingfrom
01-07-apollo_network_benchmark_added_network_metrics_to_network_manager

Conversation

@sirandreww-starkware
Copy link
Copy Markdown
Contributor

@sirandreww-starkware sirandreww-starkware commented Jan 8, 2026

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 NetworkManager with a minimal NetworkMetrics instance, 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.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Contributor Author

sirandreww-starkware commented Jan 8, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

This was referenced Jan 8, 2026
@sirandreww-starkware sirandreww-starkware marked this pull request as ready for review January 8, 2026 17:42
@sirandreww-starkware sirandreww-starkware self-assigned this Jan 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 8, 2026

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale.
This PR will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

@github-actions github-actions Bot added the stale label Feb 8, 2026
@github-actions github-actions Bot closed this Feb 16, 2026
@sirandreww-starkware sirandreww-starkware force-pushed the 01-07-apollo_network_benchmark_added_broadcast_metrics_tracking branch from 2aae34d to ca949d1 Compare February 16, 2026 09:10
@sirandreww-starkware sirandreww-starkware force-pushed the 01-07-apollo_network_benchmark_added_network_metrics_to_network_manager branch from bc15f6a to 602db52 Compare February 16, 2026 09:10
@sirandreww-starkware sirandreww-starkware force-pushed the 01-07-apollo_network_benchmark_added_broadcast_metrics_tracking branch from ca949d1 to 3b2e887 Compare February 19, 2026 07:24
@sirandreww-starkware sirandreww-starkware force-pushed the 01-07-apollo_network_benchmark_added_network_metrics_to_network_manager branch from 602db52 to 3731f9f Compare February 19, 2026 07:24
@sirandreww-starkware sirandreww-starkware force-pushed the 01-07-apollo_network_benchmark_added_broadcast_metrics_tracking branch from 3b2e887 to 64fc04b Compare February 19, 2026 08:04
@sirandreww-starkware sirandreww-starkware force-pushed the 01-07-apollo_network_benchmark_added_network_metrics_to_network_manager branch from 3731f9f to 15e099b Compare February 19, 2026 08:04
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

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" },
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

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" },
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

@github-actions github-actions Bot removed the stale label Feb 24, 2026
@sirandreww-starkware sirandreww-starkware force-pushed the 01-07-apollo_network_benchmark_added_network_metrics_to_network_manager branch from 15e099b to 9f2229a Compare March 16, 2026 15:13
@sirandreww-starkware sirandreww-starkware force-pushed the 01-07-apollo_network_benchmark_added_broadcast_metrics_tracking branch from 64fc04b to 8c425d7 Compare March 16, 2026 15:13
@sirandreww-starkware sirandreww-starkware force-pushed the 01-07-apollo_network_benchmark_added_broadcast_metrics_tracking branch from 8c425d7 to bd37dd8 Compare March 22, 2026 17:09
@sirandreww-starkware sirandreww-starkware force-pushed the 01-07-apollo_network_benchmark_added_network_metrics_to_network_manager branch from 9f2229a to 3e36182 Compare March 22, 2026 17:09
@sirandreww-starkware sirandreww-starkware force-pushed the 01-07-apollo_network_benchmark_added_network_metrics_to_network_manager branch from 3e36182 to f546ac1 Compare March 30, 2026 11:08
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants