Package io.opencensus.metrics.export
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 TimeSeries
create
(List<LabelValue> labelValues) Creates aTimeSeries
with empty(or no) points.static TimeSeries
Creates aTimeSeries
.private static TimeSeries
createInternal
(List<LabelValue> labelValues, List<Point> points, Timestamp startTimestamp) Creates aTimeSeries
.static TimeSeries
createWithOnePoint
(List<LabelValue> labelValues, Point point, Timestamp startTimestamp) Creates aTimeSeries
.abstract List
<LabelValue> Returns the set ofLabelValue
s that uniquely identify thisTimeSeries
.Returns the dataPoint
s of thisTimeSeries
.abstract Timestamp
Returns the startTimestamp
of thisTimeSeries
if thePoint
s are cumulative, ornull
if thePoint
s are gauge.Sets thePoint
of 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
- theLabelValue
s that uniquely identify thisTimeSeries
.points
- the dataPoint
s of thisTimeSeries
.startTimestamp
- the startTimestamp
of thisTimeSeries
. Must be non-null for cumulativePoint
s.- Returns:
- a
TimeSeries
. - Since:
- 0.17
-
create
Creates aTimeSeries
with empty(or no) points.- Parameters:
labelValues
- theLabelValue
s 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
- theLabelValue
s that uniquely identify thisTimeSeries
.point
- the single dataPoint
of thisTimeSeries
.startTimestamp
- the startTimestamp
of thisTimeSeries
. Must be non-null for cumulativePoint
s.- Returns:
- a
TimeSeries
. - Since:
- 0.17
-
setPoint
Sets thePoint
of theTimeSeries
.- Parameters:
point
- the single dataPoint
of 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
- theLabelValue
s that uniquely identify thisTimeSeries
.points
- the dataPoint
s of thisTimeSeries
.startTimestamp
- the startTimestamp
of thisTimeSeries
. Must be non-null for cumulativePoint
s.- Returns:
- a
TimeSeries
.
-
getLabelValues
Returns the set ofLabelValue
s that uniquely identify thisTimeSeries
.Apply to all
Point
s.The order of
LabelValue
s must match that ofLabelKey
s in theMetricDescriptor
.- Returns:
- the
LabelValue
s. - Since:
- 0.17
-
getPoints
Returns the dataPoint
s of thisTimeSeries
.- Returns:
- the data
Point
s. - Since:
- 0.17
-
getStartTimestamp
Returns the startTimestamp
of thisTimeSeries
if thePoint
s are cumulative, ornull
if thePoint
s are gauge.- Returns:
- the start
Timestamp
ornull
. - Since:
- 0.17
-