mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 14:06:02 -04:00
A trivial 'hello world'-style resource on /_synapse/metrics, with optional commandline flag
This commit is contained in:
parent
5b6e11d560
commit
e07fc62833
2 changed files with 44 additions and 0 deletions
|
@ -147,6 +147,13 @@ class SynapseHomeServer(HomeServer):
|
|||
else:
|
||||
self.root_resource = Resource()
|
||||
|
||||
if self.get_config().enable_metrics:
|
||||
from synapse.metrics.resource import (
|
||||
MetricsResource, METRICS_PREFIX
|
||||
)
|
||||
|
||||
desired_tree.append((METRICS_PREFIX, MetricsResource(self)))
|
||||
|
||||
# ideally we'd just use getChild and putChild but getChild doesn't work
|
||||
# unless you give it a Request object IN ADDITION to the name :/ So
|
||||
# instead, we'll store a copy of this mapping so we can actually add
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue