@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class MetricsRecordBuilder extends Object
Constructor and Description |
---|
MetricsRecordBuilder() |
Modifier and Type | Method and Description |
---|---|
abstract MetricsRecordBuilder |
add(AbstractMetric metric)
Add a pre-made immutable metric object
|
abstract MetricsRecordBuilder |
add(MetricsTag tag)
Add an immutable metrics tag object
|
abstract MetricsRecordBuilder |
addCounter(MetricsInfo info,
int value)
Add an integer metric
|
abstract MetricsRecordBuilder |
addCounter(MetricsInfo info,
long value)
Add an long metric
|
abstract MetricsRecordBuilder |
addGauge(MetricsInfo info,
double value)
Add a double gauge metric
|
abstract MetricsRecordBuilder |
addGauge(MetricsInfo info,
float value)
Add a float gauge metric
|
abstract MetricsRecordBuilder |
addGauge(MetricsInfo info,
int value)
Add a integer gauge metric
|
abstract MetricsRecordBuilder |
addGauge(MetricsInfo info,
long value)
Add a long gauge metric
|
MetricsCollector |
endRecord()
Syntactic sugar to add multiple records in a collector in a one liner.
|
abstract MetricsCollector |
parent() |
abstract MetricsRecordBuilder |
setContext(String value)
Set the context tag
|
abstract MetricsRecordBuilder |
tag(MetricsInfo info,
String value)
Add a metrics tag
|
public abstract MetricsRecordBuilder tag(MetricsInfo info, String value)
info
- metadata of the tagvalue
- of the tagpublic abstract MetricsRecordBuilder add(MetricsTag tag)
tag
- a pre-made tag object (potentially save an object construction)public abstract MetricsRecordBuilder add(AbstractMetric metric)
metric
- the pre-made metric to save an object constructionpublic abstract MetricsRecordBuilder setContext(String value)
value
- of the contextpublic abstract MetricsRecordBuilder addCounter(MetricsInfo info, int value)
info
- metadata of the metricvalue
- of the metricpublic abstract MetricsRecordBuilder addCounter(MetricsInfo info, long value)
info
- metadata of the metricvalue
- of the metricpublic abstract MetricsRecordBuilder addGauge(MetricsInfo info, int value)
info
- metadata of the metricvalue
- of the metricpublic abstract MetricsRecordBuilder addGauge(MetricsInfo info, long value)
info
- metadata of the metricvalue
- of the metricpublic abstract MetricsRecordBuilder addGauge(MetricsInfo info, float value)
info
- metadata of the metricvalue
- of the metricpublic abstract MetricsRecordBuilder addGauge(MetricsInfo info, double value)
info
- metadata of the metricvalue
- of the metricpublic abstract MetricsCollector parent()
public MetricsCollector endRecord()
Copyright © 2017 Apache Software Foundation. All rights reserved.