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] TracerProvider should own TracerContext, not share it #2221

Merged

Conversation

marcalff
Copy link
Member

@marcalff marcalff commented Jul 7, 2023

Fixes #2203

Changes

Fixed the TracerProvider constructor to use a unique_ptr<TracerContext>, assuming ownership.

Fixed the LoggerProvider constructor to use a unique_ptr<LoggerContext>, assuming ownership.

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

@marcalff marcalff requested a review from a team July 7, 2023 09:00
Copy link
Member

@owent owent left a comment

Choose a reason for hiding this comment

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

LGTM and thanks.

Copy link
Member

@esigo esigo left a comment

Choose a reason for hiding this comment

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

LGTM
thanks :)

@esigo esigo added the ok-to-merge The PR is ok to merge (has two approves or raised by a maintainer/approver and has one approve) label Jul 8, 2023
@codecov
Copy link

codecov bot commented Jul 8, 2023

Codecov Report

Merging #2221 (4fc10de) into main (d6cebe1) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 4fc10de differs from pull request most recent head 9b2ad7f. Consider uploading reports for the commit 9b2ad7f to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2221   +/-   ##
=======================================
  Coverage   87.49%   87.49%           
=======================================
  Files         169      169           
  Lines        4891     4891           
=======================================
  Hits         4279     4279           
  Misses        612      612           
Impacted Files Coverage Δ
sdk/src/trace/tracer_provider.cc 77.28% <100.00%> (ø)

@marcalff marcalff merged commit 8b61318 into open-telemetry:main Jul 8, 2023
@lalitb lalitb mentioned this pull request Jul 10, 2023
@marcalff marcalff deleted the fix_unique_tracer_context_2203 branch September 5, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-merge The PR is ok to merge (has two approves or raised by a maintainer/approver and has one approve)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SDK] TracerProvider should own TracerContext, not share it.
5 participants