Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not set explicit unit on Prometheus Metadata
We should not set Unit in the Metadata since if it is set, it must be a suffix of the MetricFamily name separated by an underscore. See OpenMetrics spec: https://github.com/OpenObservability/OpenMetrics/blob/1386544931307dff279688f332890c31b6c5de36/specification/OpenMetrics.md#unit This can be problematic since Micrometer adds the unit to the name but not necessarily as a suffix. For example, Micrometer does this: test_seconds_max but if Unit is present the name should be test_max_seconds The difference is not having the invalid unit definition on the output: # UNIT test_seconds_max seconds which would cause scraping errors on the server side (the Prometheus 0.x registry also does this). Closes micrometer-metricsgh-5038
- Loading branch information