A gauge metric is an instantaneous reading of a particular value. To instrument a queue's depth, for example:
final Queue<String> queue = new ConcurrentLinkedQueue<String>(); final Gauge<Integer> queueDepth = new Gauge<Integer>() { public Integer getValue() { return queue.size(); } };
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.