Class Gauge

All Implemented Interfaces:
DataPoint, GaugeDataPoint, TimerApi, Collector

public class Gauge extends StatefulMetric<GaugeDataPoint,Gauge.DataPoint> implements GaugeDataPoint
Gauge metric.

Example usage:


 Gauge currentActiveUsers = Gauge.builder()
     .name("current_active_users")
     .help("Number of users that are currently active")
     .labelNames("region")
     .register();

 public void login(String region) {
     currentActiveUsers.labelValues(region).inc();
     // perform login
 }

 public void logout(String region) {
     currentActiveUsers.labelValues(region).dec();
     // perform logout
 }