opentelemetry-js
opentelemetry-js copied to clipboard
[metrics] prototype attributes instrument advisory parameter
Goal:
We should prototype the attributes instrument advisory parameter as described in the spec. We should ensure that this parameter is appropriately marked as experimental in both the API and SDK.
Resources:
- API spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#instrument-advisory-parameter-attributes
- SDK spec: https://github.com/open-telemetry/opentelemetry-specification/blob/6360b49d20ae451b28f7ba0be168ed9a799ac9e1/specification/metrics/sdk.md?plain=1#L372-L375
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
im looking into this, just making sure i understand it;
we want to be able to set attributes on the Instrument level and those attributes will be on all metrics recorded from it?
As I understand it, it acts as an allow-list for attributes, filtering out all attribute keys that are not in that list. I'll open an issue on the spec to seek clarification.
Edit: link to spec issue: https://github.com/open-telemetry/opentelemetry-specification/issues/4037
I added a link to the SDK spec to the description where it mentions that it's an allow-list:
This is, at a minimum, an allow-list of attribute keys for measurements captured in the metric stream. [...] If the user does not provide any value, the SDK SHOULD use the
Attributesadvisory parameter configured on the instrument instead. If theAttributesadvisory parameter is absent, all attributes MUST be kept.
Thanks
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.