summary refs log tree commit diff
path: root/synapse/federation/transaction_queue.py
diff options
context:
space:
mode:
authorPaul Evans <leonerd@leonerd.org.uk>2017-04-12 11:04:31 +0100
committerGitHub <noreply@github.com>2017-04-12 11:04:31 +0100
commit8fbc0d29ee58507d00bbcf956497eacbeab95dab (patch)
tree3b36246eabe7ca4ea0624c466869026922249044 /synapse/federation/transaction_queue.py
parentMerge pull request #2116 from matrix-org/erikj/dedupe_federation_repl2 (diff)
parentAdd a counter metric for successfully-sent transactions (diff)
downloadsynapse-8fbc0d29ee58507d00bbcf956497eacbeab95dab.tar.xz
Merge pull request #2121 from matrix-org/paul/sent-transactions-metric
Add a counter metric for successfully-sent transactions
Diffstat (limited to 'synapse/federation/transaction_queue.py')
-rw-r--r--synapse/federation/transaction_queue.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/federation/transaction_queue.py b/synapse/federation/transaction_queue.py
index c27ce7c5f3..0e43891647 100644
--- a/synapse/federation/transaction_queue.py
+++ b/synapse/federation/transaction_queue.py
@@ -41,6 +41,8 @@ sent_pdus_destination_dist = client_metrics.register_distribution(
 )
 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
@@ -374,6 +376,7 @@ class TransactionQueue(object):
                     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: