Class RetryMetricsCollector

java.lang.Object
io.prometheus.client.Collector
io.github.resilience4j.prometheus.collectors.RetryMetricsCollector

public class RetryMetricsCollector
extends io.prometheus.client.Collector
Collects Retry exposed Bulkhead.Metrics.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  RetryMetricsCollector.MetricNames
    Defines possible configuration for metric names.

    Nested classes/interfaces inherited from class io.prometheus.client.Collector

    io.prometheus.client.Collector.Describable, io.prometheus.client.Collector.MetricFamilySamples, io.prometheus.client.Collector.Type
  • Field Summary

    Fields inherited from class io.prometheus.client.Collector

    MILLISECONDS_PER_SECOND, NANOSECONDS_PER_SECOND
  • Method Summary

    Modifier and Type Method Description
    java.util.List<io.prometheus.client.Collector.MetricFamilySamples> collect()  
    static RetryMetricsCollector ofRetryRegistry​(RetryMetricsCollector.MetricNames names, io.github.resilience4j.retry.RetryRegistry retryRegistry)
    Creates a new collector with custom metric names and using given supplier as source of retries.
    static RetryMetricsCollector ofRetryRegistry​(io.github.resilience4j.retry.RetryRegistry retryRegistry)
    Creates a new collector using given registry as source of retries.

    Methods inherited from class io.prometheus.client.Collector

    checkMetricLabelName, checkMetricName, doubleToGoString, register, register, sanitizeMetricName

    Methods inherited from class java.lang.Object

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

    • ofRetryRegistry

      public static RetryMetricsCollector ofRetryRegistry​(RetryMetricsCollector.MetricNames names, io.github.resilience4j.retry.RetryRegistry retryRegistry)
      Creates a new collector with custom metric names and using given supplier as source of retries.
      Parameters:
      names - the custom metric names
      retryRegistry - the source of retries
    • ofRetryRegistry

      public static RetryMetricsCollector ofRetryRegistry​(io.github.resilience4j.retry.RetryRegistry retryRegistry)
      Creates a new collector using given registry as source of retries.
      Parameters:
      retryRegistry - the source of retries
    • collect

      public java.util.List<io.prometheus.client.Collector.MetricFamilySamples> collect()
      Specified by:
      collect in class io.prometheus.client.Collector