Background
When using Resources with an OTel SDK, the attributes of the resource are exported as attributes of the time series target_info by the Prometheus Exporter.
This generates a very hard to use user experience for the user querying this data, as they are forced to use joins which makes query authoring hard, non-discoverable and also hard to read the query. This was nicely outlined in this document.
Seems that the best practice is to copy those attributes into each time-series attributes. Today done by the Prometheus scraper.
What are you trying to achieve?
I would like to improve the UX of people using OTel SDK and exporting with Prometheus exporters, such that they will have the option to copy all or some of the attributes of the resource, optionally adding a prefix of their choice.
What's the alternative today?
The user of OTel SDK avoid exposing certain attributes as Resource, and creates a wrapper on top of OTel which it uses to create Attributes with - to make sure all resource attributes will also exists in each Attributes. That's the only way.
Background
When using Resources with an OTel SDK, the attributes of the resource are exported as attributes of the time series
target_infoby the Prometheus Exporter.This generates a very hard to use user experience for the user querying this data, as they are forced to use joins which makes query authoring hard, non-discoverable and also hard to read the query. This was nicely outlined in this document.
Seems that the best practice is to copy those attributes into each time-series attributes. Today done by the Prometheus scraper.
What are you trying to achieve?
I would like to improve the UX of people using OTel SDK and exporting with Prometheus exporters, such that they will have the option to copy all or some of the attributes of the resource, optionally adding a prefix of their choice.
What's the alternative today?
The user of OTel SDK avoid exposing certain attributes as Resource, and creates a wrapper on top of OTel which it uses to create Attributes with - to make sure all resource attributes will also exists in each Attributes. That's the only way.