From ebed4b47e6b4f020799e33e3c13a7f039b125dcf Mon Sep 17 00:00:00 2001 From: Michal Nazarewicz Date: Mon, 5 Sep 2022 09:02:53 +0200 Subject: [PATCH] network: deprecate near_peer_message_received_total (#7548) Deprecate near_peer_message_received_total Prometheus metric in favour of aggregating near_peer_message_received_by_type_total metric instead. --- CHANGELOG.md | 4 ++++ chain/network/src/stats/metrics.rs | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7468d8449df..7f6a8ff2165 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ * Added `near_peer_message_sent_by_type_bytes` and `near_peer_message_sent_by_type_total` Prometheus metrics measuring size and number of messages sent to peers. +* `near_peer_message_received_total` Prometheus metric is now deprecated. + Instead of it aggregate `near_peer_message_received_by_type_total` metric + instead. For example, to get total rate of received messages use + `sum(rate(near_peer_message_received_by_type_total{...}[5m]))`. ## 1.28.0 [2022-07-27] diff --git a/chain/network/src/stats/metrics.rs b/chain/network/src/stats/metrics.rs index 9446b96536d..8b6b5d87f67 100644 --- a/chain/network/src/stats/metrics.rs +++ b/chain/network/src/stats/metrics.rs @@ -102,10 +102,11 @@ pub(crate) static PEER_MESSAGE_RECEIVED_BY_TYPE_BYTES: Lazy = Laz ) .unwrap() }); +// TODO(mina86): This has been deprecated in 1.30. Remove at 1.32 or so. pub(crate) static PEER_MESSAGE_RECEIVED_TOTAL: Lazy = Lazy::new(|| { try_create_int_counter( "near_peer_message_received_total", - "Number of messages received from peers", + "Deprecated; aggregate near_peer_message_received_by_type_total instead", ) .unwrap() });