Class PrometheusMeterRegistries

java.lang.Object
com.linecorp.armeria.common.metric.PrometheusMeterRegistries

public final class PrometheusMeterRegistries extends Object
Provides the convenient factory methods for PrometheusMeterRegistry with more sensible defaults for NamingConvention.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends io.micrometer.prometheus.PrometheusMeterRegistry>
    T
    configureRegistry(T meterRegistry)
    Configures the PrometheusMeterRegistry with Armeria's defaults.
    static io.micrometer.prometheus.PrometheusMeterRegistry
    Returns the default PrometheusMeterRegistry that uses CollectorRegistry.defaultRegistry.
    static io.micrometer.prometheus.PrometheusMeterRegistry
    Returns a newly-created PrometheusMeterRegistry instance with a new CollectorRegistry.
    static io.micrometer.prometheus.PrometheusMeterRegistry
    newRegistry(io.prometheus.client.CollectorRegistry registry)
    Returns a newly-created PrometheusMeterRegistry instance with the specified CollectorRegistry.
    static io.micrometer.prometheus.PrometheusMeterRegistry
    newRegistry(io.prometheus.client.CollectorRegistry registry, io.micrometer.core.instrument.Clock clock)
    Returns a newly-created PrometheusMeterRegistry instance with the specified CollectorRegistry and Clock.

    Methods inherited from class java.lang.Object

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

    • defaultRegistry

      public static io.micrometer.prometheus.PrometheusMeterRegistry defaultRegistry()
      Returns the default PrometheusMeterRegistry that uses CollectorRegistry.defaultRegistry.
    • newRegistry

      public static io.micrometer.prometheus.PrometheusMeterRegistry newRegistry()
      Returns a newly-created PrometheusMeterRegistry instance with a new CollectorRegistry.
    • newRegistry

      public static io.micrometer.prometheus.PrometheusMeterRegistry newRegistry(io.prometheus.client.CollectorRegistry registry)
      Returns a newly-created PrometheusMeterRegistry instance with the specified CollectorRegistry.
    • newRegistry

      public static io.micrometer.prometheus.PrometheusMeterRegistry newRegistry(io.prometheus.client.CollectorRegistry registry, io.micrometer.core.instrument.Clock clock)
      Returns a newly-created PrometheusMeterRegistry instance with the specified CollectorRegistry and Clock.
    • configureRegistry

      public static <T extends io.micrometer.prometheus.PrometheusMeterRegistry> T configureRegistry(T meterRegistry)
      Configures the PrometheusMeterRegistry with Armeria's defaults.
      Returns:
      the specified PrometheusMeterRegistry