failsafe icon indicating copy to clipboard operation
failsafe copied to clipboard

Feature: micrometer.io metrics integration

Open magicprinc opened this issue 2 years ago • 5 comments

If you are looking for new ideas: https://micrometer.io/ Metrics would be great!

It is new SLF4J for metrics and all people I know use it as standard de facto.

If you need something for an inspiration: https://github.com/brettwooldridge/HikariCP/tree/dev/src/main/java/com/zaxxer/hikari/metrics/micrometer

https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/CaffeineCacheMetrics.java

https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/okhttp3/OkHttpMetricsEventListener.java

magicprinc avatar Nov 28 '22 21:11 magicprinc

The approach Failsafe takes is to expose event listeners which could be used to record metrics, which avoids adding any external dependencies. Are there any particular metrics/event listeners that you'd like to see?

jhalterman avatar Nov 29 '22 01:11 jhalterman

Metrics are my colleges' responsibility, so I don't have a concrete answer yet :-)

But usually people like if somebody smarter than they—"an expert in the field" have already made decisions.

I know that Hystrix has a lot of metrics, even with HttpServlet to publish them as JSON feed.

Here are your competitors as a source of inspiration: https://resilience4j.readme.io/docs/micrometer

https://github.com/findinpath/spring-retry-metrics

magicprinc avatar Nov 29 '22 14:11 magicprinc

Core library without dependencies is a good thing! It could be an additional (optional) artifact.

And people who use let's say Prometheus directly could clone the project and make a "Prometheus metrics for FailSafe"

magicprinc avatar Nov 29 '22 14:11 magicprinc