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

OtlpTracePipeline fixed to no longer set global provider #1812

Conversation

utpilla
Copy link
Contributor

@utpilla utpilla commented May 23, 2024

Towards #1592

Changes

  • This PR modifies the OTLP trace pipeline to not setup the global meter provider itself.
  • End users must use the returned provider (a clone of it, if they cannot give up ownership), and call global::set_tracer_provider() themselves, if they want to set a global meter provider.
  • Updated documentation comments for logs

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@utpilla utpilla requested a review from a team May 23, 2024 18:54
@utpilla utpilla changed the title OTLPMetricPipeline fixed to no longer set global provider OtlpTracePipeline fixed to no longer set global provider May 23, 2024
Copy link
Contributor

@TommyCpp TommyCpp left a comment

Choose a reason for hiding this comment

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

Good to merge once we rename all init_tracer to init_tracer_provider. Thanks a lot!

Copy link

codecov bot commented May 24, 2024

Codecov Report

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

Project coverage is 73.8%. Comparing base (ec9fd62) to head (9283384).
Report is 1 commits behind head on main.

Files Patch % Lines
opentelemetry-otlp/src/span.rs 50.0% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1812     +/-   ##
=======================================
+ Coverage   73.6%   73.8%   +0.1%     
=======================================
  Files        122     122             
  Lines      19515   19503     -12     
=======================================
+ Hits       14377   14402     +25     
+ Misses      5138    5101     -37     

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

@utpilla
Copy link
Contributor Author

utpilla commented May 24, 2024

Thanks for the review! I have addressed all the comments.

@cijothomas cijothomas merged commit b1a80ee into open-telemetry:main May 24, 2024
21 of 22 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.

4 participants