opencensus-java
opencensus-java copied to clipboard
Timeseries.setPoint should also set the startTime
https://github.com/bogdandrutu/opencensus-java/blob/master/api/src/main/java/io/opencensus/metrics/export/TimeSeries.java#L96
I think only cumulative metrics have start time, and per proto definition:
// Must be present for cumulative metrics. The time when the cumulative value
// was reset to zero. Exclusive. The cumulative value is over the time interval
// (start_timestamp, timestamp]. If not specified, the backend can use the
// previous recorded value.
google.protobuf.Timestamp start_timestamp = 1;
It seems start time is the time when aggregation begins. So you're suggesting Timeseries.setPoint resets the cumulative metrics?
"SetPoint" is a helper function to skip validation of the label values. If the initial Timeseries had a startTime that should be preserved.