Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2121 from matrix-org/paul/sent-transactions-metric
Browse files Browse the repository at this point in the history
Add a counter metric for successfully-sent transactions
  • Loading branch information
leonerd authored Apr 12, 2017
2 parents c06c001 + 11dbceb commit 8fbc0d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions synapse/federation/transaction_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
)
sent_edus_counter = client_metrics.register_counter("sent_edus")

sent_transactions_counter = client_metrics.register_counter("sent_transactions")


class TransactionQueue(object):
"""This class makes sure we only have one transaction in flight at
Expand Down Expand Up @@ -374,6 +376,7 @@ def _attempt_new_transaction(self, destination):
destination, pending_pdus, pending_edus, pending_failures,
)
if success:
sent_transactions_counter.inc()
# Remove the acknowledged device messages from the database
# Only bother if we actually sent some device messages
if device_message_edus:
Expand Down

0 comments on commit 8fbc0d2

Please sign in to comment.