diff options
author | Erik Johnston <erik@matrix.org> | 2021-11-01 11:21:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-01 11:21:36 +0000 |
commit | 82d2168a15741ed4546c12c06d797627469fb684 (patch) | |
tree | 9db6bc56a7d1c4e35a4eefaf8acb1f4a7fc51bbb /synapse/app/_base.py | |
parent | Test that `ClientIpStore` combines database and in-memory data correctly (#11... (diff) | |
download | synapse-82d2168a15741ed4546c12c06d797627469fb684.tar.xz |
Add metrics to the threadpools (#11178)
Diffstat (limited to 'synapse/app/_base.py')
-rw-r--r-- | synapse/app/_base.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/app/_base.py b/synapse/app/_base.py index f4c3f867a8..f2c1028b5d 100644 --- a/synapse/app/_base.py +++ b/synapse/app/_base.py @@ -45,6 +45,7 @@ from synapse.events.spamcheck import load_legacy_spam_checkers from synapse.events.third_party_rules import load_legacy_third_party_event_rules from synapse.handlers.auth import load_legacy_password_auth_providers from synapse.logging.context import PreserveLoggingContext +from synapse.metrics import register_threadpool from synapse.metrics.background_process_metrics import wrap_as_background_process from synapse.metrics.jemalloc import setup_jemalloc_stats from synapse.util.caches.lrucache import setup_expire_lru_cache_entries @@ -351,6 +352,10 @@ async def start(hs: "HomeServer"): GAIResolver(reactor, getThreadPool=lambda: resolver_threadpool) ) + # Register the threadpools with our metrics. + register_threadpool("default", reactor.getThreadPool()) + register_threadpool("gai_resolver", resolver_threadpool) + # Set up the SIGHUP machinery. if hasattr(signal, "SIGHUP"): |