@Inject
@Metric(name="histogram")
public Histogram histogram;
A meter of the field's type will be created and injected into managed objects. It will be up to the user to interact
with the metric. This annotation can be used on fields of type Meter, Timer, SimpleTimer, Counter, and Histogram.
This may also be used to register a metric.
| 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 metric belongs to. By default, the value isMetricRegistry#APPLICATION_SCOPE.The scope that this metric belongs to. |
| public String[] | Returns: The tags of the metric. 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 metric. |
| public String | Returns: The unit of the metric. By default, the value isMetricUnits#NONE.The unit of the metric. |
| 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 metric.
| |
| name | back to summary |
|---|---|
| public String name() The name of the metric.
| |
| scope | back to summary |
|---|---|
| public String scope() The scope that this metric belongs to.
| |
| tags | back to summary |
|---|---|
| public String[] tags() The tags of the metric.
| |
| unit | back to summary |
|---|---|
| public String unit() The unit of the metric.
| |