Class LoggingMeter

java.lang.Object
com.couchbase.client.core.cnc.metrics.LoggingMeter
All Implemented Interfaces:
Meter

public class LoggingMeter extends Object implements Meter
The default metrics implementation which aggregates latency information and emits it at a regular interval.
  • Method Details

    • create

      public static LoggingMeter create(EventBus eventBus, LoggingMeterConfig config)
    • config

      public LoggingMeterConfig config()
      Returns the currently active configuration.
    • counter

      public Counter counter(String name, Map<String,String> tags)
      Note that since we are not performing any aggregations on the counter type, this pretty much is a NOOP for performance reasons.
      Specified by:
      counter in interface Meter
      Parameters:
      name - the name of the counter (unused).
      tags - the tags to apply (unused).
      Returns:
      a cached noop instance of the counter.
    • valueRecorder

      public ValueRecorder valueRecorder(String name, Map<String,String> tags)
      Description copied from interface: Meter
      Creates a new value recorder.
      Specified by:
      valueRecorder in interface Meter
      Parameters:
      name - the name of the value recorder.
      tags - the tags of the value recorder.
      Returns:
      the created value recorder.
    • start

      public Mono<Void> start()
      Description copied from interface: Meter
      Starts the meter if it hasn't been started, might be a noop depending on the implementation.
      Specified by:
      start in interface Meter
    • stop

      public Mono<Void> stop(Duration timeout)
      Description copied from interface: Meter
      Stops the metrics if it has been started previously, might be a noop depending on the implementation.
      Specified by:
      stop in interface Meter