Datasource Metrics for Postgres DB are not available at /q/metrics endpoint [QUARKUS]

179 Views Asked by At

Quarkus App - Rest service to fetch data from Postgres DB

Quarkus version : 2.9.0.Final

Postgres Extension - quarkus-reactive-pg-client

Micrometer Extension - quarkus-micrometer-registry-prometheus

After adding the above extensions , the postgres db metrics are not available at /q/metrics endpoint.

How to get the pg datasource metrics while using reactive pg drivers

1

There are 1 best solutions below

5
On BEST ANSWER

The support for metrics in the reactive client is not ready yet. It's predicted to become available on Quarkus 2.16.

Once is done, you need to enable the DB metrics by setting this property:

quarkus.datasource.metrics.enabled=true

As explained here: https://quarkus.io/guides/datasource#datasource-metrics