core / pragma.metrics / bindStandardJvmMetrics /
bindStandardJvmMetrics #
fun bindStandardJvmMetrics(registry: MeterRegistry, tags: Iterable<Tag> = emptyList(), gcOverheadLookback: Duration = Duration.ofMinutes(2), gcOverheadTestEvery: Duration = Duration.ofSeconds(15)): List<AutoCloseable>
Binds the standard set of JVM/system metrics every Pragma process should expose.
Uses direct ThreadMXBean gauges instead of Micrometer’s JvmThreadMetrics, which walks every thread under a JVM-internal lock and caused service-impacting stalls.
Returns JvmGcMetrics and JvmHeapPressureMetrics as AutoCloseables — both install JMX notification listeners that leak if not closed on shutdown.