Class TimeSeries
java.lang.Object
io.opencensus.metrics.export.TimeSeries
- Direct Known Subclasses:
AutoValue_TimeSeries
A collection of data points that describes the time-varying values of a
Metric.- Since:
- 0.17
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TimeSeriescreate(List<LabelValue> labelValues) Creates aTimeSerieswith empty(or no) points.static TimeSeriesCreates aTimeSeries.private static TimeSeriescreateInternal(List<LabelValue> labelValues, List<Point> points, Timestamp startTimestamp) Creates aTimeSeries.static TimeSeriescreateWithOnePoint(List<LabelValue> labelValues, Point point, Timestamp startTimestamp) Creates aTimeSeries.abstract List<LabelValue> Returns the set ofLabelValues that uniquely identify thisTimeSeries.Returns the dataPoints of thisTimeSeries.abstract TimestampReturns the startTimestampof thisTimeSeriesif thePoints are cumulative, ornullif thePoints are gauge.Sets thePointof theTimeSeries.
-
Constructor Details
-
TimeSeries
TimeSeries()
-
-
Method Details
-
create
public static TimeSeries create(List<LabelValue> labelValues, List<Point> points, @Nullable Timestamp startTimestamp) Creates aTimeSeries.- Parameters:
labelValues- theLabelValues that uniquely identify thisTimeSeries.points- the dataPoints of thisTimeSeries.startTimestamp- the startTimestampof thisTimeSeries. Must be non-null for cumulativePoints.- Returns:
- a
TimeSeries. - Since:
- 0.17
-
create
Creates aTimeSerieswith empty(or no) points.- Parameters:
labelValues- theLabelValues that uniquely identify thisTimeSeries.- Returns:
- a
TimeSeries. - Since:
- 0.17
-
createWithOnePoint
public static TimeSeries createWithOnePoint(List<LabelValue> labelValues, Point point, @Nullable Timestamp startTimestamp) Creates aTimeSeries.- Parameters:
labelValues- theLabelValues that uniquely identify thisTimeSeries.point- the single dataPointof thisTimeSeries.startTimestamp- the startTimestampof thisTimeSeries. Must be non-null for cumulativePoints.- Returns:
- a
TimeSeries. - Since:
- 0.17
-
setPoint
Sets thePointof theTimeSeries.- Parameters:
point- the single dataPointof thisTimeSeries.- Returns:
- a
TimeSeries. - Since:
- 0.17
-
createInternal
private static TimeSeries createInternal(List<LabelValue> labelValues, List<Point> points, @Nullable Timestamp startTimestamp) Creates aTimeSeries.- Parameters:
labelValues- theLabelValues that uniquely identify thisTimeSeries.points- the dataPoints of thisTimeSeries.startTimestamp- the startTimestampof thisTimeSeries. Must be non-null for cumulativePoints.- Returns:
- a
TimeSeries.
-
getLabelValues
Returns the set ofLabelValues that uniquely identify thisTimeSeries.Apply to all
Points.The order of
LabelValues must match that ofLabelKeys in theMetricDescriptor.- Returns:
- the
LabelValues. - Since:
- 0.17
-
getPoints
Returns the dataPoints of thisTimeSeries.- Returns:
- the data
Points. - Since:
- 0.17
-
getStartTimestamp
-