-
Notifications
You must be signed in to change notification settings - Fork 821
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
feat: exponential histogram - part 2 - the accumulation and aggregator #3505
feat: exponential histogram - part 2 - the accumulation and aggregator #3505
Conversation
3a4e102
to
3d3b3e0
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3505 +/- ##
==========================================
+ Coverage 93.56% 93.72% +0.16%
==========================================
Files 275 277 +2
Lines 8126 8448 +322
Branches 1691 1754 +63
==========================================
+ Hits 7603 7918 +315
- Misses 523 530 +7
|
3d3b3e0
to
e5394bd
Compare
e5394bd
to
dcd4cd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry my review took so long
packages/sdk-metrics/src/aggregator/exponential-histogram/util.ts
Outdated
Show resolved
Hide resolved
packages/sdk-metrics/src/aggregator/exponential-histogram/util.ts
Outdated
Show resolved
Hide resolved
@open-telemetry/javascript-maintainers would like at least one more set of experienced eyes on this. @legendecas if you have time to look I would really appreciate it since you're the most familiar with the metrics SDK. @pichlermarc you've also done a lot of metrics work so your insight here would also be great. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 🚀
I'm still having a hard time understanding everything, but I feel like I understand it a bit better now, thanks for adding all the great comments explaining what's happening. 🙂
No major comments, just a few nits. 🙂
packages/sdk-metrics/test/aggregator/ExponentialHistogram.test.ts
Outdated
Show resolved
Hide resolved
packages/sdk-metrics/src/aggregator/exponential-histogram/Buckets.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was looking to merge this and did another quick review on it: I realized that we're exporting ExponentialHistogram
already which may want to hold back until we get #3654 out the door.
However, with the proposed changes below we could merge it now and we won't have to wait for the 1.10.0
release. 🙂
dataPoint: | ||
| DataPoint<number> | ||
| DataPoint<Histogram> | ||
| DataPoint<ExponentialHistogram>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we may be able to reduce this to
dataPoint: | |
| DataPoint<number> | |
| DataPoint<Histogram> | |
| DataPoint<ExponentialHistogram>, | |
dataPoint: DataPoint<number>, |
if we change
toSingularDataPoints(metricData: MetricData)
->toSingularDataPoints(metricData: SumMetricData | GaugeMetricData)
toHistogramDataPoints(metricData: MetricData)
->toSingularDataPoints(metricData: HistogramMetricData)
This way, we don't have to export ExponentialHistogram
from @opentelemetry/sdk-metrics
and we can merge this PR before following through with #3654, as it would not expose any new types. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I was out last week. I wanted to check in to see if this is still needed since #3654 was merged and released?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries 🙂
It's not blocking for me - since there's no release imminent I think it would be safe to merge as-is.
Which problem is this PR solving?
This PR is part 2 in a series of PRs to add exponential histogram support. See this comparison for the changes introduced in this PR (omitting the mapping functions from part 1).
Related: #3324
Short description of the changes
This PR includes ExponentialHistogramAccumulation and ExponentialHistogramAggregator along with extensive unit testing. This is the bulk of the work and uses the mapping functions introduced in part 1.
This code is heavily based on the Golang reference implementation. For other details see:
For the other PRs in this series see:
You can see all 3 PRs combined in the original draft PR
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: