Skip to content

angry-cellophane/micrometer-prometheus-fix

Repository files navigation

what's this?

An attempt to solve this issue micrometer-metrics/micrometer#877

How does it work?

Changes in MicrometerCollector to make label keys dynamic. Check this PR for more details micrometer-metrics/micrometer#2653

What's the prometheus output looks like after the change?

# 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

Is it safe to use?

Yes, absolutely. No metric gets dropped quietly, output format is valid and parsable by prometheus.

What if I want to use it now?

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

About

Trying a fix to deal with metrics with non-consistent tags

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages