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

Implement Exponential Histgoram metrics #525

Merged

Conversation

jhoongo
Copy link
Contributor

@jhoongo jhoongo commented Mar 11, 2024

This PR implements ExponentialHistogram metric in Swift SDK. Most of the implementations was inspired and driven by https://github.com/open-telemetry/opentelemetry-java SDK. It has been validated with Java SDK to ensure that it generates the same results and passes the same tests for the most part.

There might be some missing area that I might have missed on this, but this should be good enough for us to starting point for supporting Exponential Histogram.

I have excluded the implementation of Exponential Histogram on the old metric and only implemented it for Stable Metrics.

Note: I just notice the spacing/indentation issue on this PR, will follow up shortly on this. Fixed the indentation issues and added few more testings

Copy link

codecov bot commented Mar 11, 2024

Codecov Report

Attention: Patch coverage is 90.38462% with 55 lines in your changes are missing coverage. Please review.

Project coverage is 68.41%. Comparing base (1535a05) to head (f69c8b2).

Files Patch % Lines
...ta/Internal/Base2ExponentialHistogramIndexer.swift 67.39% 15 Missing ⚠️
...elemetryProtocolCommon/metric/MetricsAdapter.swift 69.56% 14 Missing ⚠️
...on/DoubleBase2ExponentialHistogramAggregator.swift 89.47% 14 Missing ⚠️
...ernal/DoubleBase2ExponentialHistogramBuckets.swift 96.84% 3 Missing ⚠️
...table/Exemplar/LongToDoubleExemplarReservoir.swift 75.00% 3 Missing ⚠️
...le/Aggregation/AdaptingCircularBufferCounter.swift 97.05% 2 Missing ⚠️
...rics/Stable/Aggregation/AdaptingIntegerArray.swift 98.44% 2 Missing ⚠️
...egation/Base2ExponentialHistogramAggregation.swift 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #525      +/-   ##
==========================================
+ Coverage   67.41%   68.41%   +0.99%     
==========================================
  Files         335      344       +9     
  Lines       14585    15151     +566     
==========================================
+ Hits         9833    10365     +532     
- Misses       4752     4786      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jhoongo jhoongo force-pushed the exponential-histogram-metrics branch 4 times, most recently from e8b506a to 6e5e46e Compare March 15, 2024 03:15
Copy link
Member

@nachoBonafonte nachoBonafonte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really great work, just some minor stylistic issues.

@jhoongo jhoongo force-pushed the exponential-histogram-metrics branch 2 times, most recently from b7d34be to 562162e Compare March 21, 2024 23:03
@jhoongo jhoongo force-pushed the exponential-histogram-metrics branch from 562162e to f69c8b2 Compare March 21, 2024 23:05
@jhoongo
Copy link
Contributor Author

jhoongo commented Mar 21, 2024

Really great work, just some minor stylistic issues.

Thanks for the review @nachoBonafonte ! I've updated the PR with your feedback and rebase it to the latest main. Please let me know if you still have any further feedback or concern. Thanks,

@nachoBonafonte nachoBonafonte merged commit 7fabc89 into open-telemetry:main Mar 23, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants