Package com.codahale.metrics.annotation
Annotation Type Gauge
An annotation for marking a method of an annotated object as a gauge.
Given a method like this:
@Gauge(name = "queueSize")
public int getQueueSize() {
return queue.size;
}
A gauge for the defining class with the name queueSize
will be created which uses the
annotated method's return value as its value.
-
Optional Element Summary
-
Element Details
-
name
String name- Returns:
- The gauge's name.
- Default:
- ""
-
absolute
boolean absolute- Returns:
- If
true
, use the given name as an absolute name. Iffalse
, use the given name relative to the annotated class.
- Default:
- false
-