Given a method annotated with @Gauge like this:
@Gauge(name = "queueSize")
public int getQueueSize() {
return queue.size;
}
A gauge with the fully qualified class name + queueSize will be created which uses the annotated method's
return value as its value.
The annotated method/field must be of numeric type (extends java.lang.Number ).
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: Iftrue, use the given name as an absolute name. If false (default), use the given name
relative to the annotated class.Denotes whether to use the absolute name or use the default given name relative to the annotated class. |
| public String | |
| public String | |
| public String | Returns: The scope this gauge belongs to. By default, the value isMetricRegistry#APPLICATION_SCOPE.The scope that this gauge belongs to. |
| public String[] | Returns: The tags of the gauge. EachString tag must be in the form of 'key=value'. If the input is empty
or does not contain a '=' sign, the entry is ignored.The tags of the gauge. |
| public String |
| absolute | back to summary |
|---|---|
| public boolean absolute() Denotes whether to use the absolute name or use the default given name relative to the annotated class.
| |
| description | back to summary |
|---|---|
| public String description() The description of the gauge.
| |
| name | back to summary |
|---|---|
| public String name() The name of the gauge.
| |
| scope | back to summary |
|---|---|
| public String scope() The scope that this gauge belongs to.
| |
| tags | back to summary |
|---|---|
| public String[] tags() The tags of the gauge.
| |
| unit | back to summary |
|---|---|
| public String unit() The unit of the gauge.
| |