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

[sdk-trace] make resource private in BasicTracerProvider #4791

Open
4 tasks
pichlermarc opened this issue Jun 14, 2024 · 0 comments
Open
4 tasks

[sdk-trace] make resource private in BasicTracerProvider #4791

pichlermarc opened this issue Jun 14, 2024 · 0 comments
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)

Comments

@pichlermarc
Copy link
Member

pichlermarc commented Jun 14, 2024

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

  • the resource property at has been marked private or protected
  • it has been verified that resource is not public in any other way for the BasicTracerProvider
  • it has been verified that resource is not public in any other way for the WebTracerProvider
  • it has been verified that resource is not public in any other way for the NodeTracerProvider
@pichlermarc pichlermarc added never-stale spec-noncompliant An existing feature incorrectly or incompletely implements the OTel spec. May or may not be a bug pkg:sdk-trace-base pkg:sdk-trace-node pkg:sdk-trace-web target:next-major-release This PR targets the next major release (`next` branch) labels Jun 14, 2024
@pichlermarc pichlermarc added this to the OpenTelemetry SDK 2.0 milestone Jun 14, 2024
@pichlermarc pichlermarc changed the title [trace-base] make resource private in BasicTracerProvider [trace] make resource private in BasicTracerProvider Jun 14, 2024
@pichlermarc pichlermarc changed the title [trace] make resource private in BasicTracerProvider [sdk-trace] make resource private in BasicTracerProvider Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
Projects
None yet
Development

No branches or pull requests

1 participant