Interface DoubleUpDownCounter

All Superinterfaces:
Instrument

public interface DoubleUpDownCounter extends Instrument
A counter that supports decreasing and increasing values. Useful for capturing the number of requests in a queue.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final DoubleUpDownCounter
    Noop counter for use in tests
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(double inc)
    Add to the counter
    void
    add(double inc, Map<String,Object> attributes)
    Add to the counter

    Methods inherited from interface org.elasticsearch.telemetry.metric.Instrument

    getName
  • Field Details

  • Method Details

    • add

      void add(double inc)
      Add to the counter
      Parameters:
      inc - may be negative.
    • add

      void add(double inc, Map<String,Object> attributes)
      Add to the counter
      Parameters:
      inc - may be negative.
      attributes - key-value pairs to associate with this increment