Interface LongUpDownCounter

All Superinterfaces:
Instrument

public interface LongUpDownCounter 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 LongUpDownCounter
    Noop counter for use in tests
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(long inc)
    Add to the counter
    void
    add(long 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(long inc)
      Add to the counter
      Parameters:
      inc - may be negative.
    • add

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