open-telemetry / opentelemetry-js

OpenTelemetry JavaScript Client
https://opentelemetry.io
Apache License 2.0
2.76k stars 810 forks source link

refactor(sdk-trace-base): remove `_registeredSpanProcessors` from BasicTracerProvider #5177

Closed david-luna closed 4 days ago

david-luna commented 6 days ago

Which problem is this PR solving?

After merging https://github.com/open-telemetry/opentelemetry-js/pull/5152 it is not necessary to have _registeredSpanProcessors private property to modify at runtime. This PR does remove the property and adapts the tests.

Fixes #5136

Short description of the changes

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Checklist:

codecov[bot] commented 6 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.14%. Comparing base (4a394cc) to head (75b0843). Report is 3 commits behind head on next.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## next #5177 +/- ## ========================================== - Coverage 93.15% 93.14% -0.02% ========================================== Files 315 315 Lines 8113 8106 -7 Branches 1633 1633 ========================================== - Hits 7558 7550 -8 - Misses 555 556 +1 ``` | [Files with missing lines](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5177?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [...elemetry-sdk-trace-base/src/BasicTracerProvider.ts](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5177?src=pr&el=tree&filepath=packages%2Fopentelemetry-sdk-trace-base%2Fsrc%2FBasicTracerProvider.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-cGFja2FnZXMvb3BlbnRlbGVtZXRyeS1zZGstdHJhY2UtYmFzZS9zcmMvQmFzaWNUcmFjZXJQcm92aWRlci50cw==) | `96.33% <100.00%> (+0.64%)` | :arrow_up: | | [packages/opentelemetry-sdk-trace-base/src/Span.ts](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5177?src=pr&el=tree&filepath=packages%2Fopentelemetry-sdk-trace-base%2Fsrc%2FSpan.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-cGFja2FnZXMvb3BlbnRlbGVtZXRyeS1zZGstdHJhY2UtYmFzZS9zcmMvU3Bhbi50cw==) | `97.61% <ø> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5177/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)

🚨 Try these New Features: