Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: Raw vs. other metrics / measurements are unclear #83

Closed
yurishkuro opened this issue May 11, 2019 · 12 comments
Closed

API: Raw vs. other metrics / measurements are unclear #83

yurishkuro opened this issue May 11, 2019 · 12 comments
Assignees
Labels
area:api Cross language API specification issue spec:metrics Related to the specification/metrics directory
Milestone

Comments

@yurishkuro
Copy link
Member

Re-posting questions from open-telemetry/opentelemetry-java#226 (comment)

  • in many other metrics APIs that allow recording gauges, timers, and/or histograms, the recording API is still about recording the raw measure, but behind the scene the library may or may not perform some form of aggregation, like LastValue for gauges, or Histogram for timers. So the distinction between raw measure and Gauge/Histogram is not clear to me, since from instrumentation point of view it's always recording the raw value.
  • on the other hand, counters seem to be fundamentally different and can never be captured via raw measure, is that correct? This breaks the mental model for me.
  • being able to change aggregation without touching instrumentation is great - I often wanted to see something like queue_length not as a gauge but as a histogram (incidentally tally didn't support histograms for non-timer values)
  • application of request-scoped tags is also very tricky. As @bogdandrutu said, there are some stats that don't make sense to be labeled with request-scoped tags, e.g. CPU utilization. For measures where we do want to apply context tags, the ability to define views also provides a place to define context tag rules, potentially on a per-measure basis, e.g. "allow tags A and B for measureX, but only tag B for measure Y" (however, see next item).
@bogdandrutu bogdandrutu changed the title Raw vs. other metrics / measurements are unclear API: Raw vs. other metrics / measurements are unclear May 13, 2019
@SergeyKanzhelev
Copy link
Member

@yurishkuro is it somehting we need to finalize before API Complete milestone or we can change later?

@yurishkuro
Copy link
Member Author

@SergeyKanzhelev I don't have a strong preference. I think improving metrics API is not in scope of v1, so I just wrote my concerns since I haven't used OpenCensus metrics API before, but it's not a blocker.

@SergeyKanzhelev
Copy link
Member

deferring discussion for later

@SergeyKanzhelev SergeyKanzhelev transferred this issue from open-telemetry/opentelemetry-java Jun 7, 2019
@SergeyKanzhelev SergeyKanzhelev added the area:api Cross language API specification issue label Jun 7, 2019
@SergeyKanzhelev SergeyKanzhelev added this to the API revision: 07-2019 milestone Jun 7, 2019
@jmacd
Copy link
Contributor

jmacd commented Jun 7, 2019

@yurishkuro Can you clarify "counters seem to be fundamentally different and can never be captured via raw measure, is that correct?". I think in terms of a raw measurement being a simple numerical value. Whether we call something a count or a gauge depends on the aggregations that make sense. If you're thinking of something as a count, it means you intend to compute a sum or a rate, but you could meaningfully ask for a distribution of a count increments too.

@yurishkuro
Copy link
Member Author

@jmacd that's fair

@iredelmeier iredelmeier added the spec:metrics Related to the specification/metrics directory label Jul 30, 2019
@SergeyKanzhelev SergeyKanzhelev modified the milestones: API revision: 07-2019, Alpha v0.2 Sep 27, 2019
@tedsuo
Copy link
Contributor

tedsuo commented Oct 4, 2019

@yurishkuro I believe the new metric spec (#250) has changed significantly and addresses these issues. Can we close this issue?

@yurishkuro
Copy link
Member Author

I suggest to mark the metrics spec PR as resolving this issue.

@jmacd
Copy link
Contributor

jmacd commented Oct 7, 2019

I marked this as resolved in the corresponding OTEP but it doesn't show up in this repo.
See the bottom of https://github.com/open-telemetry/oteps/blob/master/text/0003-measure-metric-type.md
I'm not sure how else to "mark the PR" as resolving this issue, but happy to do so.

@yurishkuro
Copy link
Member Author

I don't think you can auto-resolve issues from another repo. But the spec change is in the same repo so will auto resolve it

@jmacd
Copy link
Contributor

jmacd commented Oct 7, 2019 via email

@yurishkuro
Copy link
Member Author

In the PR description you can say "resolves ####" and the issue will be closed when PR is merged

@SergeyKanzhelev
Copy link
Member

I believe it is resolved via #299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Cross language API specification issue spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

No branches or pull requests

6 participants