collectNodeJSMetrics relies on prom-client to collect eventLoopMonitoring. This in turns relies on node:perf_hooks/monitorEventLoopDelay that only works for the main thread or worker from the cluster module (as documented here).
woker_threads support is unclear, although we relies on this for worker_threads monitoring (network and discv5).
Proposed action items
Improve event loop monitoring, especially for workers. It looks preferable not to rely on prom-client for this specific monitoring and add support directly in lodestar.
collectNodeJSMetrics relies on prom-client to collect
eventLoopMonitoring. This in turns relies on node:perf_hooks/monitorEventLoopDelay that only works for themainthread orworkerfrom theclustermodule (as documented here).woker_threadssupport is unclear, although we relies on this forworker_threadsmonitoring (network and discv5).Proposed action items
Improve event loop monitoring, especially for
workers. It looks preferable not to rely onprom-clientfor this specific monitoring and add support directly inlodestar.