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

[Metrics SDK] Add Metrics ExemplarFilter and ExemplarReservoir #1584

Merged
merged 15 commits into from
Oct 5, 2022

Conversation

esigo
Copy link
Member

@esigo esigo commented Aug 28, 2022

Fixes #1498 (issue)

Changes

implements FilteredExemplarReservoir, HistogramExemplarReservoir and WithTraceSampleFilter.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@esigo esigo changed the title [Metrics SDK] Add Metrics ExemplarFilter and ExemplarReservoir WIP [Metrics SDK] Add Metrics ExemplarFilter and ExemplarReservoir Aug 28, 2022
@codecov
Copy link

codecov bot commented Aug 28, 2022

Codecov Report

Merging #1584 (339bef5) into main (1bda597) will decrease coverage by 0.71%.
The diff coverage is 60.14%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1584      +/-   ##
==========================================
- Coverage   85.04%   84.33%   -0.70%     
==========================================
  Files         159      168       +9     
  Lines        4990     5122     +132     
==========================================
+ Hits         4243     4319      +76     
- Misses        747      803      +56     
Impacted Files Coverage Δ
...ude/opentelemetry/sdk/metrics/data/exemplar_data.h 0.00% <0.00%> (ø)
...emetry/sdk/metrics/exemplar/always_sample_filter.h 100.00% <ø> (ø)
...nclude/opentelemetry/sdk/metrics/exemplar/filter.h 100.00% <ø> (ø)
...sdk/metrics/exemplar/filtered_exemplar_reservoir.h 0.00% <0.00%> (ø)
...lemetry/sdk/metrics/exemplar/never_sample_filter.h 100.00% <ø> (ø)
...ude/opentelemetry/sdk/metrics/exemplar/reservoir.h 100.00% <ø> (ø)
sdk/src/metrics/meter.cc 33.08% <0.00%> (ø)
...pentelemetry/sdk/metrics/exemplar/reservoir_cell.h 58.83% <58.83%> (ø)
sdk/src/metrics/exemplar/reservoir.cc 66.67% <66.67%> (ø)
...k/metrics/exemplar/fixed_size_exemplar_reservoir.h 71.43% <71.43%> (ø)
... and 5 more

@esigo esigo changed the title WIP [Metrics SDK] Add Metrics ExemplarFilter and ExemplarReservoir [Metrics SDK] Add Metrics ExemplarFilter and ExemplarReservoir Sep 11, 2022
@esigo esigo marked this pull request as ready for review September 11, 2022 17:13
@esigo esigo requested a review from a team September 11, 2022 17:13
sdk/include/opentelemetry/sdk/metrics/data/exemplar_data.h Outdated Show resolved Hide resolved
sdk/include/opentelemetry/sdk/metrics/exemplar/filter.h Outdated Show resolved Hide resolved
sdk/src/metrics/exemplar/filter.cc Outdated Show resolved Hide resolved
sdk/src/metrics/exemplar/filter.cc Outdated Show resolved Hide resolved
{
namespace metrics
{
class FilteredExemplarReservoir final : public ExemplarReservoir
Copy link
Member

Choose a reason for hiding this comment

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

as per the specs, there are only two reservoirs -SimpleFixedSizeExemplarReservoir, AlignedHistogramBucketExemplarReservoir. What is the purpose of this reservoir.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a reservoir that has a pre-filter on measurements. Java has it. Shall I remove it?
I think a filter per trace would be interesting for the users.

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I have some minor comments :)

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. LGTM

@esigo esigo merged commit 7724361 into open-telemetry:main Oct 5, 2022
@esigo esigo deleted the exemplar branch October 5, 2022 16:35
yxue pushed a commit to yxue/opentelemetry-cpp that referenced this pull request Dec 5, 2022
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.

[Metrics SDK] Add Metrics ExemplarFilter and ExemplarReservoir
2 participants