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

[metrics] prototype attributes instrument advisory parameter

Open pichlermarc opened this issue 1 year ago • 6 comments

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

pichlermarc avatar Dec 13 '23 18:12 pichlermarc

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.

github-actions[bot] avatar Feb 26 '24 06:02 github-actions[bot]

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?

dermasmid avatar May 05 '24 10:05 dermasmid

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

pichlermarc avatar May 07 '24 11:05 pichlermarc

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 Attributes advisory parameter configured on the instrument instead. If the Attributes advisory parameter is absent, all attributes MUST be kept.

pichlermarc avatar May 07 '24 11:05 pichlermarc

Thanks

dermasmid avatar May 07 '24 19:05 dermasmid

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.

github-actions[bot] avatar Jul 22 '24 06:07 github-actions[bot]