diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2019-07-18 23:57:15 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-18 23:57:15 +1000 |
commit | 7ad1d763566eb34bd32234811aa9901d8f3668aa (patch) | |
tree | 2349489f45b024f7b5430f6405687c1c36bedc33 /synapse/metrics/__init__.py | |
parent | Remove the ability to query relations when the original event was redacted. (... (diff) | |
download | synapse-7ad1d763566eb34bd32234811aa9901d8f3668aa.tar.xz |
Support Prometheus_client 0.4.0+ (#5636)
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r-- | synapse/metrics/__init__.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py index eaf0aaa86e..488280b4a6 100644 --- a/synapse/metrics/__init__.py +++ b/synapse/metrics/__init__.py @@ -29,8 +29,16 @@ from prometheus_client.core import REGISTRY, GaugeMetricFamily, HistogramMetricF from twisted.internet import reactor +from synapse.metrics._exposition import ( + MetricsResource, + generate_latest, + start_http_server, +) + logger = logging.getLogger(__name__) +METRICS_PREFIX = "/_synapse/metrics" + running_on_pypy = platform.python_implementation() == "PyPy" all_metrics = [] all_collectors = [] @@ -470,3 +478,12 @@ try: gc.disable() except AttributeError: pass + +__all__ = [ + "MetricsResource", + "generate_latest", + "start_http_server", + "LaterGauge", + "InFlightGauge", + "BucketCollector", +] |