Supplies Ebean database metrics to avaje-metrics via DatabaseMetricSupplier.
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-metrics-ebean</artifactId>
<version>${version}</version>
</dependency>If the application uses module-info.java, also add:
requires io.avaje.metrics.ebean;import io.avaje.metrics.Metrics;
import io.avaje.metrics.ebean.DatabaseMetricSupplier;
Metrics.addSupplier(new DatabaseMetricSupplier(database));Once added, normal registry collection and export paths will see the database metrics:
var metrics = Metrics.collectMetrics();DatabaseMetricSuppliersupports both delta and cumulative collection modes.- This module is useful with registry-driven export paths such as manual collection or
avaje-metrics-otel-producer. - If you are using
avaje-metrics-statsdoravaje-metrics-graphite, those modules also provide direct.database(...)convenience methods on their reporter builders.