[sdk-trace] make resource
private in BasicTracerProvider
#4791
Labels
never-stale
pkg:sdk-trace-base
pkg:sdk-trace-node
pkg:sdk-trace-web
spec-noncompliant
An existing feature incorrectly or incompletely implements the OTel spec. May or may not be a bug
target:next-major-release
This PR targets the next major release (`next` branch)
Milestone
Description
resource
is currently public and incorrectly allows users to modify resource attributes by setting (provider.resource.attributes["some"] = "value"
) on the fly even though the resource should be immutable.This can have unintended side-effects on the exported telemetry and should therefore be avoided.
This issue is considered done when
opentelemetry-js/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts
Line 74 in 47444f2
BasicTracerProvider
WebTracerProvider
NodeTracerProvider
The text was updated successfully, but these errors were encountered: