This repository was archived by the owner on Dec 23, 2023. It is now read-only.
Repository navigation
Metrics: Add Cumulative APIs. - #1848
Merged
Merged
Conversation
rghetia
approved these changes
Apr 18, 2019
rghetia
left a comment
Contributor
There was a problem hiding this comment.
few nits related to since annotations.
LGTM otherwise.
dinooliva
reviewed
Apr 19, 2019
|
|
||
| /** | ||
| * Derived Double Cumulative metric, to report cumulative measurement of a double value. Cumulative | ||
| * values can go up or stay the same, but can never go down. The cumulative values cannot be |
Contributor
There was a problem hiding this comment.
"The cumulative values" -> "Cumulative values" - similarly below.
|
|
||
| /** | ||
| * Builds a new long cumulative to be added to the registry. This is more convenient form when you | ||
| * want to manually increase values as per your service requirements. |
Contributor
There was a problem hiding this comment.
"This is more convenient form" -> "This form is more convenient" or "This is a more convenient form" - here and below.
| * @since 0.21 | ||
| */ | ||
| @ExperimentalApi | ||
| public abstract LongCumulative addLongCumulative(String name, MetricOptions options); |
Contributor
There was a problem hiding this comment.
Why the name add.. - seems like it's only building something not adding it to anything.
Contributor
Author
There was a problem hiding this comment.
It's both building a new *Cumulative object and adding it to the MetricRegistry so that all metric readers can read it from the MetricRegistry.
dinooliva
approved these changes
Apr 19, 2019
Contributor
Author
|
Thanks! Implementation will be in a follow-up PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates #1815.
Although the Spec PR (census-instrumentation/opencensus-specs#254) hasn't been submitted, Cumulative APIs have already been added to Go and Node. This PR adds the Cumulative APIs in Java similar to Go (census-instrumentation/opencensus-go#1090).
Most are a copy-and-paste from Gauge APIs since they are very similar.