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

[resource] Remove an attribute #4218

Open
CodeBlanch opened this issue Sep 19, 2024 · 3 comments
Open

[resource] Remove an attribute #4218

CodeBlanch opened this issue Sep 19, 2024 · 3 comments
Labels
spec:resource Related to the specification/resource directory triage:deciding:community-feedback

Comments

@CodeBlanch
Copy link
Member

What are you trying to achieve?

I just got an interesting request from a user. They are using some .NET resource detectors like this:

otelOptions.SetResourceBuilder(
   ResourceBuilder.CreateDefault()
      .AddService(serviceName: "VoiceCompanionApp", serviceVersion: "1.0.0")
      .AddHostDetector()
      .AddProcessDetector()
      .AddProcessRuntimeDetector()
      .AddOperatingSystemDetector());

User wants to remove "hostname" & "username" attributes from the final resource.

There is a Merge operation defined in the spec but I don't see a way to remove specific keys via that mechanism.

Q: Should we extend Merge to support removal or add something dedicated?

/cc @flaviocdc

@cijothomas
Copy link
Member

  • @jsuereth who is driving Resource v2/Entities

@trask
Copy link
Member

trask commented Sep 26, 2024

I believe this is going to be supported in declarative configuration in case that helps: https://github.com/open-telemetry/opentelemetry-configuration/blob/f27d8d9514c4e3bf661026567bfb5c2c61e553ce/examples/kitchen-sink.yaml#L364-L369

@pellared
Copy link
Member

I think it still needs programmatic support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:resource Related to the specification/resource directory triage:deciding:community-feedback
Projects
None yet
Development

No branches or pull requests

5 participants