diff options
Diffstat (limited to 'synapse/app')
-rwxr-xr-x | synapse/app/homeserver.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 5df4ba23ab..9747f7a015 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -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 |