Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics for number of outgoing EDUs, by type #4695

merged 1 commit into from Feb 20, 2019
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+19 −6
Diff settings


Just for now

Copy path View file
@@ -0,0 +1 @@
Add prometheus metrics for number of outgoing EDUs, by type.
@@ -33,7 +33,6 @@
from synapse.metrics.background_process_metrics import run_as_background_process
@@ -47,10 +46,24 @@
logger = logging.getLogger(__name__)

sent_pdus_destination_dist_count = Counter(
"synapse_federation_client_sent_pdu_destinations:count", ""
"Number of PDUs queued for sending to one or more destinations",

sent_pdus_destination_dist_total = Counter(
"synapse_federation_client_sent_pdu_destinations:total", ""
"Total number of PDUs queued for sending across all destinations",

sent_edus_counter = Counter(
"Total number of EDUs successfully sent",

sent_edus_by_type = Counter(
"Number of sent EDUs successfully sent, by event type",

@@ -360,8 +373,6 @@ def send_edu(self, destination, edu_type, content, key=None):"Not sending EDU to ourselves")

if key:
destination, {}
@@ -496,6 +507,9 @@ def _transaction_transmission_loop(self, destination):
if success:
for edu in pending_edus:
# Remove the acknowledged device messages from the database
# Only bother if we actually sent some device messages
if device_message_edus:
Copy path View file
@@ -274,8 +274,6 @@ def collect(self):
# Federation Metrics

sent_edus_counter = Counter("synapse_federation_client_sent_edus", "")

sent_transactions_counter = Counter("synapse_federation_client_sent_transactions", "")

events_processed_counter = Counter("synapse_federation_client_events_processed", "")
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.