summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-05-22 10:56:03 -0500
committerAmber Brown <hawkowl@atleastfornow.net>2018-05-22 10:56:03 -0500
commit8f5a688d420c8f6b51826c561da9094b76fbea1e (patch)
tree28fad2087a86d9aa6f4100985d3b83c7c970cf83 /synapse/http
parentMerge remote-tracking branch 'origin/develop' into 3218-official-prom (diff)
downloadsynapse-8f5a688d420c8f6b51826c561da9094b76fbea1e.tar.xz
cleanups, self-registration
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/request_metrics.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/synapse/http/request_metrics.py b/synapse/http/request_metrics.py

index 0984870e7e..e7f1bfc4ae 100644 --- a/synapse/http/request_metrics.py +++ b/synapse/http/request_metrics.py
@@ -71,24 +71,14 @@ in_flight_requests_db_sched_duration = Counter("synapse_http_request_in_flight_r _in_flight_requests = set() -def _collect_in_flight(): - """Called just before metrics are collected, so we use it to update all - the in flight request metrics - """ - - for rm in _in_flight_requests: - rm.update_metrics() - - -metrics.register_collector(_collect_in_flight) - - def _get_in_flight_counts(): """Returns a count of all in flight requests by (method, server_name) Returns: dict[tuple[str, str], int] """ + for rm in _in_flight_requests: + rm.update_metrics() # Map from (method, name) -> int, the number of in flight requests of that # type @@ -99,6 +89,7 @@ def _get_in_flight_counts(): return counts + LaterGauge( "synapse_http_request_metrics_in_flight_requests_count", "", ["method", "servlet"],