Package org.opennms.nephron.cortex
Interface TimeSeriesBuilder
-
public interface TimeSeriesBuilderAllows to add labels and samples to an underlying protobuf builder.The metric name is just a special kind of label. Therefore
setMetricName(String)should be called only once.Label names and metric names are sanitized according to Cortex requirements.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default TimeSeriesBuilderaddLabel(String name, int value)default TimeSeriesBuilderaddLabel(String name, Integer value)TimeSeriesBuilderaddLabel(String name, String value)TimeSeriesBuilderaddSample(long epochMillis, double value)TimeSeriesBuildernextSeries()Starts another time series.TimeSeriesBuildersetMetricName(String name)
-
-
-
Method Detail
-
setMetricName
TimeSeriesBuilder setMetricName(String name)
-
addLabel
TimeSeriesBuilder addLabel(String name, String value)
-
addSample
TimeSeriesBuilder addSample(long epochMillis, double value)
-
nextSeries
TimeSeriesBuilder nextSeries()
Starts another time series.Clients of a time series builder may need to output samples for different time series. In that case
nextSeriesmust be called in-between.
-
addLabel
default TimeSeriesBuilder addLabel(String name, int value)
-
addLabel
default TimeSeriesBuilder addLabel(String name, Integer value)
-
-