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 · 1 comment
Open

[resource] Remove an attribute #4218

CodeBlanch opened this issue Sep 19, 2024 · 1 comment
Labels
spec:resource Related to the specification/resource directory

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

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
Projects
None yet
Development

No branches or pull requests

2 participants