From 77a336cfb5410dc8971d090aef37f39b879d282e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 2 Nov 2026 15:11:56 +0000 Subject: [PATCH] Prefix threadpool with 'module-' --- synapse/module_api/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py index ee33ba4df3..47ec15e3d5 100644 --- a/synapse/module_api/__init__.py +++ b/synapse/module_api/__init__.py @@ -1766,7 +1766,10 @@ class ModuleApi: The return value of the function once ran in a thread. """ # Report the CPU time of the module's threads under the pool's name. - thread_cpu_metrics.register_threadpool(threadpool.name or "module", threadpool) + thread_pool_name = "module-other" + if threadpool.name: + thread_pool_name = "module-" + threadpool.name + thread_cpu_metrics.register_threadpool(thread_pool_name, threadpool) return await defer_to_threadpool( self._hs.get_reactor(), threadpool, f, *args, **kwargs