mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 19:53:51 +01:00
Have the MetricsResource actually render metric counters
This commit is contained in:
parent
74bc42cfdd
commit
a594087f06
1 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,8 @@
|
||||||
from twisted.web.resource import Resource
|
from twisted.web.resource import Resource
|
||||||
from twisted.web.server import NOT_DONE_YET
|
from twisted.web.server import NOT_DONE_YET
|
||||||
|
|
||||||
|
import synapse.metrics
|
||||||
|
|
||||||
|
|
||||||
METRICS_PREFIX = "/_synapse/metrics"
|
METRICS_PREFIX = "/_synapse/metrics"
|
||||||
|
|
||||||
|
@ -29,7 +31,7 @@ class MetricsResource(Resource):
|
||||||
self.hs = hs
|
self.hs = hs
|
||||||
|
|
||||||
def render_GET(self, request):
|
def render_GET(self, request):
|
||||||
response = "Hello, world!"
|
response = synapse.metrics.render_all()
|
||||||
|
|
||||||
request.setHeader("Content-Type", "text/plain")
|
request.setHeader("Content-Type", "text/plain")
|
||||||
request.setHeader("Content-Length", str(len(response)))
|
request.setHeader("Content-Length", str(len(response)))
|
||||||
|
|
Loading…
Reference in a new issue