InstrumentedThreadFactory
class InstrumentedThreadFactory(delegate: ThreadFactory, name: String, help: String) : ThreadFactory
A ThreadFactory decorator that instruments thread lifecycle with Prometheus metrics.
Tracks the number of threads created (counter), currently running (gauge), and terminated (counter).
Parameters
delegate
the underlying ThreadFactory to delegate thread creation to.
name
the base name for the Prometheus metrics (suffixed with _threads_created, _threads_running, _threads_terminated).
help
the base help text for the Prometheus metrics.