metrics-exporter-prometheus should use units set by describe macro. #426
Labels
C-exporter
Component: exporters such as Prometheus, TCP, etc.
E-intermediate
Effort: intermediate.
T-ergonomics
Type: ergonomics.
T-request
Type: request.
Feature request 1
The
describe_*!
macros set a unit for each metric but metrics-exporter-prometheus does not currently make use of it.The prometheus protocol itself does not provide a way to set a unit however it is documented that the correct way to handle units in prometheus is to postfix them to the end of the metric name.
So I propose that given a metric like:
It will export as:
This will allow this library to be truly generic across different metrics protocols, as otherwise the user will need to duplicate unit information in other protocols in order to properly use prometheus.
This feature could be disabled in the prometheus builder if there are cases where the user only uses prometheus and needs greater control.
Feature request 2
Additionally that same page mentions that applications should prefix metrics with the name of the application.
So maybe we should also have an optional setting in the prometheus builder to set the application name such that the previous export will now export as:
This follows the same reasoning as the previous feature, other protocols may not include the application name at the beginning of each name resulting in redundant information.
The text was updated successfully, but these errors were encountered: