Skip to content

Commit

Permalink
network: add algod_peer_p2p_broadcast_dropped_total metric
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy committed Sep 25, 2024
1 parent 96b13f0 commit c484674
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion network/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ var networkBroadcastSendMicros = metrics.MakeCounter(metrics.MetricName{Name: "a
var networkBroadcastsDropped = metrics.MakeCounter(metrics.MetricName{Name: "algod_broadcasts_dropped_total", Description: "number of broadcast messages not sent to any peer"})
var networkPeerBroadcastDropped = metrics.MakeCounter(metrics.MetricName{Name: "algod_peer_broadcast_dropped_total", Description: "number of broadcast messages not sent to some peer"})

var networkP2PPeerBroadcastDropped = metrics.MakeCounter(metrics.MetricName{Name: "algod_peer_p2p_broadcast_dropped_total", Description: "number of broadcast messages not sent to some p2p peer"})

var networkPeerIdentityDisconnect = metrics.MakeCounter(metrics.MetricName{Name: "algod_network_identity_duplicate", Description: "number of times identity challenge cause us to disconnect a peer"})
var networkPeerIdentityError = metrics.MakeCounter(metrics.MetricName{Name: "algod_network_identity_error", Description: "number of times an error occurs (besides expected) when processing identity challenges"})
var networkPeerAlreadyClosed = metrics.MakeCounter(metrics.MetricName{Name: "algod_network_peer_already_closed", Description: "number of times a peer would be added but the peer connection is already closed"})
Expand Down Expand Up @@ -197,7 +199,9 @@ func (t pubsubMetricsTracer) SendRPC(rpc *pubsub.RPC, p peer.ID) {
}

// DropRPC is invoked when an outbound RPC is dropped, typically because of a queue full.
func (t pubsubMetricsTracer) DropRPC(rpc *pubsub.RPC, p peer.ID) {}
func (t pubsubMetricsTracer) DropRPC(rpc *pubsub.RPC, p peer.ID) {
networkP2PPeerBroadcastDropped.Inc(nil)

Check warning on line 203 in network/metrics.go

View check run for this annotation

Codecov / codecov/patch

network/metrics.go#L202-L203

Added lines #L202 - L203 were not covered by tests
}

// UndeliverableMessage is invoked when the consumer of Subscribe is not reading messages fast enough and
// the pressure release mechanism trigger, dropping messages.
Expand Down

0 comments on commit c484674

Please sign in to comment.