@InterceptorBinding @Retention(value=RUNTIME) @Target(value={METHOD,ANNOTATION_TYPE}) public @interface Gauge
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.
Given a field annotated with @Gauge like this:
@Gauge
long value;
A gauge with the fully qualified class name + value will be created which uses the
annotated field value as its value.| Modifier and Type | Required Element and Description |
|---|---|
String |
unit
The unit of the gauge.
|
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
absolute
Denotes whether to use the absolute name or use the default given name relative to the annotated class.
|
String |
description
The description of the gauge.
|
String |
displayName
The human readable display name of the gauge.
|
String |
name
The name of the gauge.
|
String[] |
tags
The tags of the gauge.
|
public abstract String unit
Metadata,
MetricUnitspublic abstract String name
public abstract boolean absolute
true, use the given name as an absolute name. If false (default), use the given name
relative to the annotated class.Copyright © 2022. All rights reserved.