Skip to content

Commit

Permalink
add algod_transaction_messages_dropped_backlog_p2p
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy committed Jul 19, 2024
1 parent cd340f1 commit 5977cca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions network/p2p/pubsubTracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

var _ = pubsub.RawTracer(pubsubTracer{})

var transactionMessagesDroppedFromBacklog = metrics.MakeCounter(metrics.TransactionMessagesDroppedFromBacklog)
var transactionMessagesDroppedFromBacklogP2P = metrics.MakeCounter(metrics.TransactionMessagesDroppedFromBacklogP2P)
var transactionMessagesDupRawMsg = metrics.MakeCounter(metrics.TransactionMessagesDupRawMsg)

// pubsubTracer is a tracer for pubsub events used to track metrics.
Expand Down Expand Up @@ -60,7 +60,7 @@ func (t pubsubTracer) DeliverMessage(msg *pubsub.Message) {}
// The reason argument can be one of the named strings Reject*.
func (t pubsubTracer) RejectMessage(msg *pubsub.Message, reason string) {
if reason == pubsub.RejectValidationThrottled || reason == pubsub.RejectValidationQueueFull {
transactionMessagesDroppedFromBacklog.Inc(nil)
transactionMessagesDroppedFromBacklogP2P.Inc(nil)

Check warning on line 63 in network/p2p/pubsubTracer.go

View check run for this annotation

Codecov / codecov/patch

network/p2p/pubsubTracer.go#L61-L63

Added lines #L61 - L63 were not covered by tests
}
}

Expand Down
2 changes: 2 additions & 0 deletions util/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ var (
TransactionMessagesHandled = MetricName{Name: "algod_transaction_messages_handled", Description: "Number of transaction messages handled"}
// TransactionMessagesDroppedFromBacklog "Number of transaction messages dropped from backlog"
TransactionMessagesDroppedFromBacklog = MetricName{Name: "algod_transaction_messages_dropped_backlog", Description: "Number of transaction messages dropped from backlog"}
// TransactionMessagesDroppedFromBacklogP2P "Number of transaction messages throttled with p2p pubsub"
TransactionMessagesDroppedFromBacklogP2P = MetricName{Name: "algod_transaction_messages_dropped_backlog_p2p", Description: "Number of transaction messages throttled with p2p pubsub"}
// TransactionMessagesDroppedFromPool "Number of transaction messages dropped from pool"
TransactionMessagesDroppedFromPool = MetricName{Name: "algod_transaction_messages_dropped_pool", Description: "Number of transaction messages dropped from pool"}
// TransactionMessagesAlreadyCommitted "Number of duplicate or error transaction messages before placing into a backlog"
Expand Down

0 comments on commit 5977cca

Please sign in to comment.