opentelemetry-specification
opentelemetry-specification copied to clipboard
[resource] Remove an attribute
trafficstars
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