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

Add a counter metric for successfully-sent transactions #2121

Merged
merged 1 commit into from
Apr 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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