Class JvmMetrics.Builder

Object
Builder
Enclosing class:
JvmMetrics

public static class JvmMetrics.Builder extends Object
  • Method Details

    • constLabels

      public JvmMetrics.Builder constLabels(Labels constLabels)
      Set constant labels that will be applied to all JVM metrics registered by this builder.
    • register

      public void register()
      Register all JVM metrics with the default registry.

      It's safe to call this multiple times, only the first call will register the metrics, all subsequent calls will be ignored.

    • register

      public void register(PrometheusRegistry registry)
      Register all JVM metrics with the registry.

      It's safe to call this multiple times, only the first call will register the metrics, all subsequent calls will be ignored.