forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(net): add NetworkMetrics (paradigmxyz#708)
* Added NetworkMetrics * update docs * add more metrics and make naming consistent * add active inbound and outbound connection metrics
- Loading branch information
Showing
7 changed files
with
103 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
use metrics::{Counter, Gauge}; | ||
use reth_metrics_derive::Metrics; | ||
|
||
/// Metrics for the entire network, handled by NetworkManager | ||
#[derive(Metrics)] | ||
#[metrics(scope = "network")] | ||
pub struct NetworkMetrics { | ||
/// Number of currently connected peers | ||
pub(crate) connected_peers: Gauge, | ||
|
||
/// Number of peers known to the node | ||
pub(crate) tracked_peers: Gauge, | ||
|
||
/// Cumulative number of failures of pending sessions | ||
pub(crate) pending_session_failures: Counter, | ||
|
||
/// Total number of sessions closed | ||
pub(crate) closed_sessions: Counter, | ||
|
||
/// Number of active incoming connections | ||
pub(crate) incoming_connections: Gauge, | ||
|
||
/// Number of active outgoing connections | ||
pub(crate) outgoing_connections: Gauge, | ||
|
||
/// Total Number of incoming connections handled | ||
pub(crate) total_incoming_connections: Counter, | ||
|
||
/// Total Number of outgoing connections established | ||
pub(crate) total_outgoing_connections: Counter, | ||
|
||
/// Number of invalid/malformed messages received from peers | ||
pub(crate) invalid_messages_received: Counter, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters