diff options
author | Erik Johnston <erik@matrix.org> | 2020-11-13 12:03:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-13 12:03:51 +0000 |
commit | 427ede619febc4e57fed09364c00c53ddfc5d9c7 (patch) | |
tree | 62dae3e0d6e48a6d6be74506ddee23682986d195 /synapse/metrics/__init__.py | |
parent | Fix port script so that it can be run again after failure. (#8755) (diff) | |
download | synapse-427ede619febc4e57fed09364c00c53ddfc5d9c7.tar.xz |
Add metrics for tracking 3PID /requestToken requests. (#8712)
The main use case is to see how many requests are being made, and how many are second/third/etc attempts. If there are large number of retries then that likely indicates a delivery problem.
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r-- | synapse/metrics/__init__.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py index b8d2a8e8a9..cbf0dbb871 100644 --- a/synapse/metrics/__init__.py +++ b/synapse/metrics/__init__.py @@ -502,6 +502,16 @@ build_info.labels( last_ticked = time.time() +# 3PID send info +threepid_send_requests = Histogram( + "synapse_threepid_send_requests_with_tries", + documentation="Number of requests for a 3pid token by try count. Note if" + " there is a request with try count of 4, then there would have been one" + " each for 1, 2 and 3", + buckets=(1, 2, 3, 4, 5, 10), + labelnames=("type", "reason"), +) + class ReactorLastSeenMetric: def collect(self): |