opentelemetry-js
opentelemetry-js copied to clipboard
[sdk-trace] make `activeSpanProcessor` private
trafficstars
Description
activeSpanProcessor is currently public and that allows users to modify the span processor by setting it on the fly even though the should be done via addSpanProcesssor() or - ideally - only via the constructor as the user is not supposed to hold on to the SDK instance of the TracerProvider after the initialization phase, as this can have unintended side-effects on the exported telemetry and should therefore be avoided.
This issue is considered done when
- [x] the
activeSpanProcessorproperty at https://github.com/open-telemetry/opentelemetry-js/blob/47444f2a4c13a80f3328ffafc5b4c8db9e9a0886/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts#L73 has been marked private or protected - [ ] it has been verified that
activeSpanProcessoris not public in any other way for theBasicTracerProvider - [ ] it has been verified that
activeSpanProcessoris not public in any other way for theWebTracerProvider - [ ] it has been verified that
activeSpanProcessoris not public in any other way for theNodeTracerProvider