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

chore(sdk-node): deprecate methods in favor of constructor options #3996

Conversation

pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Jul 14, 2023

Which problem is this PR solving?

As discussed in the SIG meeting, deprecating all methods in NodeSDK except for start() and shutdown() as everything can be done in one place via the constructor. This will reduce our API surface and reduce complexity in NodeSDK

I'll open a follow-up PR to remove these methods in a later release

Short description of the changes

deprecate

  • NodeSDK.configureTracerProvider()
  • NodeSDK.configureLoggerProvider()
  • NodeSDK.configureMeterProvider()
  • NodeSDK.addResource()
  • NodeSDK.detectResources()

remove unreleased

  • NodeSDKconfigureLoggerProvider()

How Has This Been Tested?

  • Unit tests

@pichlermarc pichlermarc changed the title chore(sdk-node): deprecate methods that duplicate constructor options chore(sdk-node): deprecate methods in favor of constructor options Jul 14, 2023
@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Merging #3996 (aae1451) into main (853a7b6) will decrease coverage by 1.86%.
The diff coverage is n/a.

❗ Current head aae1451 differs from pull request most recent head 2e767f0. Consider uploading reports for the commit 2e767f0 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3996      +/-   ##
==========================================
- Coverage   92.37%   90.52%   -1.86%     
==========================================
  Files         321      159     -162     
  Lines        9273     3756    -5517     
  Branches     1970      835    -1135     
==========================================
- Hits         8566     3400    -5166     
+ Misses        707      356     -351     

see 167 files with indirect coverage changes

@pichlermarc pichlermarc marked this pull request as ready for review July 26, 2023 11:35
@pichlermarc pichlermarc requested a review from a team July 26, 2023 11:35
@pichlermarc pichlermarc force-pushed the chore/deprecate-sdk-node-methods branch from b282fdc to 5d7a5b2 Compare July 31, 2023 13:28
experimental/CHANGELOG.md Outdated Show resolved Hide resolved
@pichlermarc pichlermarc merged commit 5259a0b into open-telemetry:main Aug 16, 2023
@pichlermarc pichlermarc deleted the chore/deprecate-sdk-node-methods branch August 16, 2023 12:38
shashi3kiran3 added a commit to shashi3kiran3/opentelemetry-js that referenced this pull request Aug 17, 2023
dyladan added a commit that referenced this pull request Aug 23, 2023
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