summary refs log tree commit diff
path: root/synapse/metrics/__init__.py
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-02-14 13:12:22 +0000
committerGitHub <noreply@github.com>2022-02-14 13:12:22 +0000
commit4ae956c8bb3d0f9a352934238b4d2a9c48307efb (patch)
treed568632d9adfd7b240aa745ebda824f070bd76ea /synapse/metrics/__init__.py
parentNotify users, rather than rooms, of device list updates (#11905) (diff)
downloadsynapse-4ae956c8bb3d0f9a352934238b4d2a9c48307efb.tar.xz
Use version string helper from matrix-common (#11979)
* Require latest matrix-common
* Use the common function
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r--synapse/metrics/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py
index cca084c18c..d321946aa2 100644
--- a/synapse/metrics/__init__.py
+++ b/synapse/metrics/__init__.py
@@ -34,6 +34,7 @@ from typing import (
 )
 
 import attr
+from matrix_common.versionstring import get_distribution_version_string
 from prometheus_client import CollectorRegistry, Counter, Gauge, Histogram, Metric
 from prometheus_client.core import (
     REGISTRY,
@@ -43,14 +44,14 @@ from prometheus_client.core import (
 
 from twisted.python.threadpool import ThreadPool
 
-import synapse.metrics._reactor_metrics
+# This module is imported for its side effects; flake8 needn't warn that it's unused.
+import synapse.metrics._reactor_metrics  # noqa: F401
 from synapse.metrics._exposition import (
     MetricsResource,
     generate_latest,
     start_http_server,
 )
 from synapse.metrics._gc import MIN_TIME_BETWEEN_GCS, install_gc_manager
-from synapse.util.versionstring import get_version_string
 
 logger = logging.getLogger(__name__)
 
@@ -417,7 +418,7 @@ build_info = Gauge(
 )
 build_info.labels(
     " ".join([platform.python_implementation(), platform.python_version()]),
-    get_version_string(synapse),
+    get_distribution_version_string("matrix-synapse"),
     " ".join([platform.system(), platform.release()]),
 ).set(1)