mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 10:48:47 -05:00
Support Prometheus_client 0.4.0+ (#5636)
This commit is contained in:
parent
b2a382efdb
commit
7ad1d76356
20 changed files with 399 additions and 50 deletions
|
|
@ -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",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue