mirror of
https://github.com/element-hq/synapse
synced 2024-09-04 12:30:06 +00:00
Merge pull request #2121 from matrix-org/paul/sent-transactions-metric
Add a counter metric for successfully-sent transactions
This commit is contained in:
commit
8fbc0d29ee
1 changed files with 3 additions and 0 deletions
|
@ -41,6 +41,8 @@ sent_pdus_destination_dist = client_metrics.register_distribution(
|
||||||
)
|
)
|
||||||
sent_edus_counter = client_metrics.register_counter("sent_edus")
|
sent_edus_counter = client_metrics.register_counter("sent_edus")
|
||||||
|
|
||||||
|
sent_transactions_counter = client_metrics.register_counter("sent_transactions")
|
||||||
|
|
||||||
|
|
||||||
class TransactionQueue(object):
|
class TransactionQueue(object):
|
||||||
"""This class makes sure we only have one transaction in flight at
|
"""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,
|
destination, pending_pdus, pending_edus, pending_failures,
|
||||||
)
|
)
|
||||||
if success:
|
if success:
|
||||||
|
sent_transactions_counter.inc()
|
||||||
# Remove the acknowledged device messages from the database
|
# Remove the acknowledged device messages from the database
|
||||||
# Only bother if we actually sent some device messages
|
# Only bother if we actually sent some device messages
|
||||||
if device_message_edus:
|
if device_message_edus:
|
||||||
|
|
Loading…
Reference in a new issue