opentelemetry-configuration icon indicating copy to clipboard operation
opentelemetry-configuration copied to clipboard

Should attribute_keys in stream configuration support include/exclude syntax?

Open codeboten opened this issue 1 year ago • 2 comments

The specification states:

attribute_keys: This is, at a minimum, an allow-list of attribute keys for measurements captured in the metric stream. The allow-list contains attribute keys that identify the attributes that MUST be kept, and all other attributes MUST be ignored.

But looking at the go implementation, an attribute filter can be specified either to include or exclude based on the attribute keys:

https://github.com/open-telemetry/opentelemetry-go/blob/main/sdk/metric/instrument.go#L146

I checked the python implementations, and it looks like that implementation only supports including attributes based on the keys.

codeboten avatar Jun 17 '24 21:06 codeboten