An attempt to solve this issue https://github.com/micrometer-metrics/micrometer/issues/877
Changes in MicrometerCollector
to make label keys dynamic.
Check this PR for more details https://github.com/micrometer-metrics/micrometer/pull/2653
# HELP counter_total
# TYPE counter_total counter
counter_total{type="success",version="1",} 1.0
counter_total{code="500",type="error",version="1",} 1.0
Yes, absolutely. No metric gets dropped quietly, output format is valid and parsable by prometheus.
Copy the classes under the io.micrometer.prometheus
package into your project.
If you use spring there's an example of a configuration in com.github.ka.micrometer.prometheus.fix.fix.MetricsConfiguration