summary refs log tree commit diff
path: root/synapse/app/_base.py
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2022-11-24 09:09:17 +0000
committerGitHub <noreply@github.com>2022-11-24 09:09:17 +0000
commit9af2be192a759c22d189b72cc0a7580cd9de8a37 (patch)
tree80e9254251a9dc11b31f2d8135d17b574539b3d5 /synapse/app/_base.py
parentFaster joins: use servers list approximation in `assert_host_in_room` (#14515) (diff)
downloadsynapse-9af2be192a759c22d189b72cc0a7580cd9de8a37.tar.xz
Remove legacy Prometheus metrics names. They were deprecated in Synapse v1.69.0 and disabled by default in Synapse v1.71.0. (#14538)
Diffstat (limited to 'synapse/app/_base.py')
-rw-r--r--synapse/app/_base.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/synapse/app/_base.py b/synapse/app/_base.py
index 41d2732ef9..a5aa2185a2 100644
--- a/synapse/app/_base.py
+++ b/synapse/app/_base.py
@@ -266,26 +266,18 @@ def register_start(
     reactor.callWhenRunning(lambda: defer.ensureDeferred(wrapper()))
 
 
-def listen_metrics(
-    bind_addresses: Iterable[str], port: int, enable_legacy_metric_names: bool
-) -> None:
+def listen_metrics(bind_addresses: Iterable[str], port: int) -> None:
     """
     Start Prometheus metrics server.
     """
     from prometheus_client import start_http_server as start_http_server_prometheus
 
-    from synapse.metrics import (
-        RegistryProxy,
-        start_http_server as start_http_server_legacy,
-    )
+    from synapse.metrics import RegistryProxy
 
     for host in bind_addresses:
         logger.info("Starting metrics listener on %s:%d", host, port)
-        if enable_legacy_metric_names:
-            start_http_server_legacy(port, addr=host, registry=RegistryProxy)
-        else:
-            _set_prometheus_client_use_created_metrics(False)
-            start_http_server_prometheus(port, addr=host, registry=RegistryProxy)
+        _set_prometheus_client_use_created_metrics(False)
+        start_http_server_prometheus(port, addr=host, registry=RegistryProxy)
 
 
 def _set_prometheus_client_use_created_metrics(new_value: bool) -> None: