open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.64k stars 870 forks source link

Clarify `Attributes` instrument advisory parameter #4037

Open pichlermarc opened 1 month ago

pichlermarc commented 1 month ago

What are you trying to achieve?

The Metrics API specification for the Attributes instrument advisory parameters reads:

Applies to all instrument types.

Attributes (a list of attribute keys) is the recommended set of attribute keys to be used for the resulting metrics.

Which gives very little context on what adding that list of attribute keys accomplishes from a user perspective. From reading the SDK spec, we get more implementation details that reveal that this is actually an allow-list of attribute keys, but only hidden inside the SDK spec for Views

I think we should clarify the API specification to indicate that this is an allow-list. Happy to open a PR if the Spec SIG agrees. :slightly_smiling_face:

Additional context.

trask commented 1 month ago

hi @pichlermarc, a clarification PR sounds good!