Skip to content

Commit

Permalink
network: deprecate near_peer_message_received_total (#7548)
Browse files Browse the repository at this point in the history
Deprecate near_peer_message_received_total Prometheus metric in favour
of aggregating near_peer_message_received_by_type_total metric instead.
  • Loading branch information
mina86 authored and nikurt committed Nov 9, 2022
1 parent f35421d commit ebed4b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
3 changes: 2 additions & 1 deletion chain/network/src/stats/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ pub(crate) static PEER_MESSAGE_RECEIVED_BY_TYPE_BYTES: Lazy<IntCounterVec> = 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<IntCounter> = 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()
});
Expand Down

0 comments on commit ebed4b4

Please sign in to comment.