opentelemetry-specification
opentelemetry-specification copied to clipboard
Clarify `Attributes` instrument advisory parameter
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.
- this came up in the context of https://github.com/open-telemetry/opentelemetry-js/issues/4365
- related to https://github.com/open-telemetry/opentelemetry-specification/issues/3785
- relevant API spec: https://github.com/open-telemetry/opentelemetry-specification/blob/6360b49d20ae451b28f7ba0be168ed9a799ac9e1/specification/metrics/api.md?plain=1#L272-L279
- relevant SDK spec: https://github.com/open-telemetry/opentelemetry-specification/blob/6360b49d20ae451b28f7ba0be168ed9a799ac9e1/specification/metrics/sdk.md?plain=1#L372-L375