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

Add metrics to track appservice transactions #3344

Merged
merged 2 commits into from
Jun 7, 2018

Conversation

Half-Shot
Copy link
Collaborator

This just adds some simple tracking from synapse to see how many transactions have been sent from the homeserver to an AS in prometheus.

@@ -219,12 +238,15 @@ def push_bulk(self, service, events, txn_id=None):
args={
"access_token": service.hs_token
})
sent_transactions_counter.label(service.id).inc()
Copy link
Collaborator Author

@Half-Shot Half-Shot Jun 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather this label was somewhat more human readable, but I don't think there is anything in service that tells us the name of the service so the ID is the best bet. Probably an oversight in the registration file to be honest.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be fair, the ID being a random string was a convention started with the js-bridge library. There's still quite a few bridges which have the default ID "telegram" or similar.

@Half-Shot
Copy link
Collaborator Author

@richvdh are you okay to review this?

@richvdh
Copy link
Member

richvdh commented Jun 6, 2018

This might be more in @hawkowl's department actually

@Half-Shot
Copy link
Collaborator Author

Apologies, hawkowl? 😇

@hawkowl
Copy link
Contributor

hawkowl commented Jun 7, 2018

Looks fine to me!

@hawkowl hawkowl assigned Half-Shot and unassigned hawkowl Jun 7, 2018
@Half-Shot
Copy link
Collaborator Author

Kewl, I'll merge then :)

@Half-Shot Half-Shot merged commit 13d211e into matrix-org:develop Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants