Class MeterRegistry.More

java.lang.Object
io.micrometer.core.instrument.MeterRegistry.More
Enclosing class:
MeterRegistry

public class MeterRegistry.More
extends java.lang.Object
Additional, less commonly used meter types.
  • Constructor Summary

    Constructors
    Constructor Description
    More()  
  • Method Summary

    Modifier and Type Method Description
    <T extends java.lang.Number>
    FunctionCounter
    counter​(java.lang.String name, java.lang.Iterable<Tag> tags, T number)
    Tracks a number, maintaining a weak reference on it.
    <T> FunctionCounter counter​(java.lang.String name, java.lang.Iterable<Tag> tags, T obj, java.util.function.ToDoubleFunction<T> countFunction)
    Tracks a monotonically increasing value, automatically incrementing the counter whenever the value is observed.
    LongTaskTimer longTaskTimer​(java.lang.String name, java.lang.Iterable<Tag> tags)
    Measures the time taken for long tasks.
    LongTaskTimer longTaskTimer​(java.lang.String name, java.lang.String... tags)
    Measures the time taken for long tasks.
    <T> TimeGauge timeGauge​(java.lang.String name, java.lang.Iterable<Tag> tags, T obj, java.util.concurrent.TimeUnit timeFunctionUnit, java.util.function.ToDoubleFunction<T> timeFunction)
    A gauge that tracks a time value, to be scaled to the monitoring system's base time unit.
    <T> FunctionTimer timer​(java.lang.String name, java.lang.Iterable<Tag> tags, T obj, java.util.function.ToLongFunction<T> countFunction, java.util.function.ToDoubleFunction<T> totalTimeFunction, java.util.concurrent.TimeUnit totalTimeFunctionUnit)
    A timer that tracks monotonically increasing functions for count and totalTime.

    Methods inherited from class java.lang.Object

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

    • More

      public More()
  • Method Details

    • longTaskTimer

      public LongTaskTimer longTaskTimer​(java.lang.String name, java.lang.String... tags)
      Measures the time taken for long tasks.
      Parameters:
      name - Name of the long task timer being registered.
      tags - MUST be an even number of arguments representing key/value pairs of tags.
      Returns:
      A new or existing long task timer.
    • longTaskTimer

      public LongTaskTimer longTaskTimer​(java.lang.String name, java.lang.Iterable<Tag> tags)
      Measures the time taken for long tasks.
      Parameters:
      name - Name of the long task timer being registered.
      tags - Sequence of dimensions for breaking down the name.
      Returns:
      A new or existing long task timer.
    • counter

      public <T> FunctionCounter counter​(java.lang.String name, java.lang.Iterable<Tag> tags, T obj, java.util.function.ToDoubleFunction<T> countFunction)
      Tracks a monotonically increasing value, automatically incrementing the counter whenever the value is observed.
      Type Parameters:
      T - The type of the state object from which the counter value is extracted.
      Parameters:
      name - Name of the counter being registered.
      tags - Sequence of dimensions for breaking down the name.
      obj - State object used to compute a value.
      countFunction - Function that produces a monotonically increasing counter value from the state object.
      Returns:
      A new or existing function counter.
    • counter

      public <T extends java.lang.Number> FunctionCounter counter​(java.lang.String name, java.lang.Iterable<Tag> tags, T number)
      Tracks a number, maintaining a weak reference on it.
      Type Parameters:
      T - The type of the state object from which the counter value is extracted.
      Parameters:
      name - Name of the counter being registered.
      tags - Sequence of dimensions for breaking down the name.
      number - A monotonically increasing number to track.
      Returns:
      A new or existing function counter.
    • timer

      public <T> FunctionTimer timer​(java.lang.String name, java.lang.Iterable<Tag> tags, T obj, java.util.function.ToLongFunction<T> countFunction, java.util.function.ToDoubleFunction<T> totalTimeFunction, java.util.concurrent.TimeUnit totalTimeFunctionUnit)
      A timer that tracks monotonically increasing functions for count and totalTime.
      Type Parameters:
      T - The type of the state object from which the function values are extracted.
      Parameters:
      name - Name of the timer being registered.
      tags - Sequence of dimensions for breaking down the name.
      obj - State object used to compute a value.
      countFunction - Function that produces a monotonically increasing counter value from the state object.
      totalTimeFunction - Function that produces a monotonically increasing total time value from the state object.
      totalTimeFunctionUnit - The base unit of time produced by the total time function.
      Returns:
      A new or existing function timer.
    • timeGauge

      public <T> TimeGauge timeGauge​(java.lang.String name, java.lang.Iterable<Tag> tags, T obj, java.util.concurrent.TimeUnit timeFunctionUnit, java.util.function.ToDoubleFunction<T> timeFunction)
      A gauge that tracks a time value, to be scaled to the monitoring system's base time unit.
      Type Parameters:
      T - The type of the state object from which the gauge value is extracted.
      Parameters:
      name - Name of the gauge being registered.
      tags - Sequence of dimensions for breaking down the name.
      obj - State object used to compute a value.
      timeFunctionUnit - The base unit of time produced by the total time function.
      timeFunction - Function that produces a time value from the state object. This value may increase and decrease over time.
      Returns:
      A new or existing time gauge.