Class JvmThreadsMetrics

Object
JvmThreadsMetrics

public class JvmThreadsMetrics extends Object
JVM Thread metrics. The JvmThreadsMetrics are registered as part of the JvmMetrics like this:

   JvmMetrics.builder().register();
 
However, if you want only the JvmThreadsMetrics you can also register them directly:

   JvmThreadMetrics.builder().register();
 
Example metrics being exported:
 # HELP jvm_threads_current Current thread count of a JVM
 # TYPE jvm_threads_current gauge
 jvm_threads_current 10.0
 # HELP jvm_threads_daemon Daemon thread count of a JVM
 # TYPE jvm_threads_daemon gauge
 jvm_threads_daemon 8.0
 # HELP jvm_threads_deadlocked Cycles of JVM-threads that are in deadlock waiting to acquire object monitors or ownable synchronizers
 # TYPE jvm_threads_deadlocked gauge
 jvm_threads_deadlocked 0.0
 # HELP jvm_threads_deadlocked_monitor Cycles of JVM-threads that are in deadlock waiting to acquire object monitors
 # TYPE jvm_threads_deadlocked_monitor gauge
 jvm_threads_deadlocked_monitor 0.0
 # HELP jvm_threads_peak Peak thread count of a JVM
 # TYPE jvm_threads_peak gauge
 jvm_threads_peak 10.0
 # HELP jvm_threads_started_total Started thread count of a JVM
 # TYPE jvm_threads_started_total counter
 jvm_threads_started_total 10.0
 # HELP jvm_threads_state Current count of threads by state
 # TYPE jvm_threads_state gauge
 jvm_threads_state{state="BLOCKED"} 0.0
 jvm_threads_state{state="NEW"} 0.0
 jvm_threads_state{state="RUNNABLE"} 5.0
 jvm_threads_state{state="TERMINATED"} 0.0
 jvm_threads_state{state="TIMED_WAITING"} 2.0
 jvm_threads_state{state="UNKNOWN"} 0.0
 jvm_threads_state{state="WAITING"} 3.0