Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Timeseries.setPoint should also set the startTime #1789

Open
bogdandrutu opened this issue Mar 6, 2019 · 2 comments
Open

Timeseries.setPoint should also set the startTime #1789

bogdandrutu opened this issue Mar 6, 2019 · 2 comments

Comments

@bogdandrutu
Copy link
Contributor

https://github.com/bogdandrutu/opencensus-java/blob/master/api/src/main/java/io/opencensus/metrics/export/TimeSeries.java#L96

@songy23
Copy link
Contributor

songy23 commented Mar 6, 2019

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?

@bogdandrutu
Copy link
Contributor Author

"SetPoint" is a helper function to skip validation of the label values. If the initial Timeseries had a startTime that should be preserved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants