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

[SDK] Provide builders to avoid exposing Metrics SDK internals #2189

Merged
merged 16 commits into from
Jun 28, 2023

Conversation

marcalff
Copy link
Member

@marcalff marcalff commented Jun 9, 2023

Fixes #1485

Changes

Please provide a brief description of the changes here.

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

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #2189 (c6d1e91) into main (cfcda57) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2189      +/-   ##
==========================================
+ Coverage   87.53%   87.53%   +0.01%     
==========================================
  Files         169      169              
  Lines        4888     4889       +1     
==========================================
+ Hits         4278     4279       +1     
  Misses        610      610              
Impacted Files Coverage Δ
...ude/opentelemetry/sdk/metrics/view/view_registry.h 93.94% <100.00%> (+0.19%) ⬆️

@marcalff marcalff changed the title [WIP][Metrics SDK] Provide builders to avoid exposing SDK internals [Metrics SDK] Provide builders to avoid exposing SDK internals Jun 20, 2023
@marcalff marcalff marked this pull request as ready for review June 20, 2023 16:05
@marcalff marcalff requested a review from a team June 20, 2023 16:05
@marcalff
Copy link
Member Author

Now ready for review.

p->AddView(std::move(histogram_instrument_selector), std::move(histogram_meter_selector),
std::move(histogram_view));

std::shared_ptr<opentelemetry::metrics::MeterProvider> provider(std::move(u_provider));
Copy link
Member

@lalitb lalitb Jun 26, 2023

Choose a reason for hiding this comment

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

These multiple casts from api:::MeterProvider -> sdk::MeterProvider -> api::MeterProvider are bit confusing, but seems we don't have better choice for now.

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.

Nicely done, Thanks for the PR.

@marcalff marcalff merged commit d0452f8 into open-telemetry:main Jun 28, 2023
@marcalff marcalff changed the title [Metrics SDK] Provide builders to avoid exposing SDK internals [SDK] Provide builders to avoid exposing Metrics SDK internals Jun 28, 2023
@marcalff marcalff deleted the fix_metric_builder_1485 branch September 5, 2023 15:07
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.

[SDK] Provide builders to avoid exposing Metrics SDK internals
3 participants