java.lang.Object
io.prometheus.metrics.instrumentation.jvm.JvmMetrics.Builder
Enclosing class:
JvmMetrics

public static class JvmMetrics.Builder extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    constLabels(io.prometheus.metrics.model.snapshots.Labels constLabels)
    Set constant labels that will be applied to all JVM metrics registered by this builder.
    void
    Register all JVM metrics with the default registry.
    void
    register(io.prometheus.metrics.model.registry.PrometheusRegistry registry)
    Register all JVM metrics with the registry.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • constLabels

      public JvmMetrics.Builder constLabels(io.prometheus.metrics.model.snapshots.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(io.prometheus.metrics.model.registry.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.