public final class Measurement extends Object implements Serializable
A metrics descriptor can be thought of as a set of attributes associated with a particular
metric, metric which in turn is defined by its name (for a full list of metric names provided see
MetricNames). The attributes are specified as tags that have names and values (for a full
list of tag names see MetricTags). An example descriptor would have a collection of
tags/attributes like this: job=jobId, pipeline=pipelineId, unit=count,
metric=SourceReceivedCount, ...
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object obj) |
Map<String,String> |
getTags() |
int |
hashCode() |
String |
metric()
Returns the name of the metric.
|
static Measurement |
of(String metric,
Object value,
long timestamp,
Map<String,String> tags)
Builds a
Measurement instance based on timestamp, value and the metric descriptor in
map form. |
String |
tag(String name)
Returns the value associated with a specific tag, based on the metric description of this
particular
Measurement. |
long |
timestamp()
Returns the timestamps associated with this
Measurement, the moment when the value
was gathered. |
String |
toString() |
Object |
value()
Returns the value associated with this
Measurement. |
public static Measurement of(String metric, Object value, long timestamp, Map<String,String> tags)
Measurement instance based on timestamp, value and the metric descriptor in
map form.public Object value()
Measurement.public long timestamp()
Measurement, the moment when the value
was gathered.public String metric()
MetricNames.public String tag(String name)
Measurement. For a list of possible tag names see MetricTags.Copyright © 2024 The Apache Software Foundation. All rights reserved.