Class MoreMeterBinders

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

public final class MoreMeterBinders extends Object
Provides useful MeterBinders to monitor various Armeria components.
  • Method Details

    • eventLoopMetrics

      @UnstableApi public static io.micrometer.core.instrument.binder.MeterBinder eventLoopMetrics(io.netty.channel.EventLoopGroup eventLoopGroup, String name)
      Returns a new MeterBinder to observe Netty's EventLoopGroups. The following stats are currently exported per registered MeterIdPrefix.
      • "event.loop.workers" (gauge) - the total number of Netty's event loops
      • "event.loop.pending.tasks" (gauge) - the total number of IO tasks waiting to be run on event loops
    • eventLoopMetrics

      @UnstableApi public static io.micrometer.core.instrument.binder.MeterBinder eventLoopMetrics(io.netty.channel.EventLoopGroup eventLoopGroup, MeterIdPrefix meterIdPrefix)
      Returns a new MeterBinder to observe Netty's EventLoopGroups. The following stats are currently exported per registered MeterIdPrefix.
      • "event.loop.workers" (gauge) - the total number of Netty's event loops
      • "event.loop.pending.tasks" (gauge) - the total number of IO tasks waiting to be run on event loops
    • certificateMetrics

      @UnstableApi public static io.micrometer.core.instrument.binder.MeterBinder certificateMetrics(X509Certificate certificate, MeterIdPrefix meterIdPrefix)
      Returns a new MeterBinder to observe the specified X509Certificate's validity. The following stats are currently exported per registered MeterIdPrefix.
      • "tls.certificate.validity" (gauge) - 1 if TLS certificate is in validity period, 0 if certificate is not in validity period
      • "tls.certificate.validity.days" (gauge) - Duration in days before TLS certificate expires, which becomes -1 if certificate is expired
      Parameters:
      certificate - the certificate to monitor
      meterIdPrefix - the prefix to use for all metrics
    • certificateMetrics

      @UnstableApi public static io.micrometer.core.instrument.binder.MeterBinder certificateMetrics(Iterable<? extends X509Certificate> certificates, MeterIdPrefix meterIdPrefix)
      Returns a new MeterBinder to observe the specified X509Certificate's validity. The following stats are currently exported per registered MeterIdPrefix.
      • "tls.certificate.validity" (gauge) - 1 if TLS certificate is in validity period, 0 if certificate is not in validity period
      • "tls.certificate.validity.days" (gauge) - Duration in days before TLS certificate expires, which becomes -1 if certificate is expired
      Parameters:
      certificates - the certificates to monitor
      meterIdPrefix - the prefix to use for all metrics
    • certificateMetrics

      @UnstableApi public static io.micrometer.core.instrument.binder.MeterBinder certificateMetrics(File keyCertChainFile, MeterIdPrefix meterIdPrefix) throws CertificateException
      Returns a new MeterBinder to observe the X509Certificate's validity in the PEM format File. The following stats are currently exported per registered MeterIdPrefix.
      • "tls.certificate.validity" (gauge) - 1 if TLS certificate is in validity period, 0 if certificate is not in validity period
      • "tls.certificate.validity.days" (gauge) - Duration in days before TLS certificate expires, which becomes -1 if certificate is expired
      Parameters:
      keyCertChainFile - the certificates to monitor
      meterIdPrefix - the prefix to use for all metrics
      Throws:
      CertificateException
    • certificateMetrics

      @UnstableApi public static io.micrometer.core.instrument.binder.MeterBinder certificateMetrics(InputStream keyCertChainFile, MeterIdPrefix meterIdPrefix) throws CertificateException
      Returns a new MeterBinder to observe the X509Certificate's validity in the PEM format InputStream. The following stats are currently exported per registered MeterIdPrefix.
      • "tls.certificate.validity" (gauge) - 1 if TLS certificate is in validity period, 0 if certificate is not in validity period
      • "tls.certificate.validity.days" (gauge) - Duration in days before TLS certificate expires, which becomes -1 if certificate is expired
      Parameters:
      keyCertChainFile - the certificates to monitor
      meterIdPrefix - the prefix to use for all metrics
      Throws:
      CertificateException