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

feat(sdk-trace-base)!: drop ability to auto-instantiate propagators beyond defaults #5355

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pichlermarc
Copy link
Member

Which problem is this PR solving?

It is currently confusing which packages implement auto-configure and to which extent. We currently auto-instantiated propagators based on environment variables in sdk-trace-base.

This PR makes it so that only the default propagators get registered when *TracerProvider#register() is called.
The auto-configuration code moves to @opentelemetry/sdk-node. Dependencies to other propagators are removed from @opentelemetry/sdk-trace-node. #4672

I will follow up later on removing BasicTracerProvider#register() (tracked in #5290)

Fixes #4672
Refs #5290

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Unit tests

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.56%. Comparing base (c00f36e) to head (4072001).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5355      +/-   ##
==========================================
+ Coverage   94.54%   94.56%   +0.01%     
==========================================
  Files         318      318              
  Lines        8051     8055       +4     
  Branches     1694     1698       +4     
==========================================
+ Hits         7612     7617       +5     
+ Misses        439      438       -1     
Files with missing lines Coverage Δ
...imental/packages/opentelemetry-sdk-node/src/sdk.ts 96.03% <100.00%> (+0.01%) ⬆️
...ental/packages/opentelemetry-sdk-node/src/utils.ts 91.37% <100.00%> (+3.14%) ⬆️
...elemetry-sdk-trace-base/src/BasicTracerProvider.ts 95.58% <100.00%> (+0.03%) ⬆️
...telemetry-sdk-trace-node/src/NodeTracerProvider.ts 100.00% <ø> (ø)

@pichlermarc pichlermarc changed the title feat(sdk-trace-base)!: drop ability to instantiate propagators beyond defaults feat(sdk-trace-base)!: drop ability to auto-instantiate propagators beyond defaults Jan 21, 2025
@pichlermarc pichlermarc marked this pull request as ready for review January 22, 2025 11:46
@pichlermarc pichlermarc requested a review from a team as a code owner January 22, 2025 11:46
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-trace-base] [sdk-trace-node] remove propagator auto-configuration from package
1 participant