Expand on thread exited

This commit is contained in:
Erik Johnston committed 2026-11-04 16:00:04 +00:00
1 parent 4f812dd2db
commit 4d60ec50a1
1 file changed
+7 -1
+7 -1
View File
@@ -165,7 +165,13 @@ class ThreadCPUMetrics(Collector):
with open(f"/proc/self/task/{tid}/stat") as f:
line = f.read()
except OSError:
# The thread exited since we listed it.
# The thread exited since we listed it. We lose this bit of
# CPU tracing, but it's hard to recover it after the thread
# has exited.
#
# We can see in the metrics how much thread CPU has been
# lost, by comparing total CPU vs. the sum of CPU used by
# all threads.
continue
# The thread name may contain spaces or brackets, so split after