mfvanek / pg-index-health

pg-index-health is a Java library for analyzing and maintaining indexes and tables health in Postgresql databases.
Apache License 2.0
123 stars 14 forks source link

Add micrometer instrumentation #115

Open mfvanek opened 2 years ago

mfvanek commented 2 years ago

Consider adding metrics in prometheus format.
We should use Micrometer 1.9.12 (or higher but compatible with Spring Boot 2.7.x)

mfvanek commented 1 year ago

For example see

The most important thing here is that metrics can't be binded during bean creation. It leads to circular dependency. Should use this pattern

    @Override
    public void onApplicationEvent(ApplicationStartedEvent event) {
...
        this.tomcatMetrics.bindTo(this.meterRegistry);
    }
mfvanek commented 1 month ago

After migration to Spring Boot 3. Consider to use Micrometer Observation