mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-04 22:07:34 +00:00
`synapse_thread_cpu_seconds_total{thread_type, mode}` reads
`/proc/self/task` on each scrape and groups threads into the main thread,
each registered threadpool, tokio (by kernel thread name), and `other`.
The kernel only reports CPU time for live threads, so the collector sums
per-thread deltas between scrapes. A thread that exits loses the CPU it
used since the last scrape.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDruzqbGMzEHotouLuudxP