In order to get an idea of how Okapi performs on a detailed level, the following custom metrics will be useful to have added:
- Any outgoing call to database need to have their own set of metrics, which include:
- rate of calling y Database (for certain operations that are suspicious of highly expensive)
- count of calls made to y database.
- response time - the time measured right before sending off the DB request to finish receiving the last bit of the response.
If Okapi calls to the database for 3 separate transactions, it'd be useful to have a similar set of metrics of each of these DB calls.
Okapi has encapsulated postgres queries into https://github.com/folio-org/okapi/blob/master/okapi-core/src/main/java/org/folio/okapi/service/impl/PostgresQuery.java
Vert.x 4 Beta 1 (release note https://vertx.io/blog/eclipse-vert-x-4-beta-1-released/ ) has added these micrometer metrics to vertx-sql-client:
- vertx_sql_queue_pending: number of requests scheduled but not yet executed
- vertx_sql_queue_time: time spent in queue before processing
- vertx_sql_processing_pending: number of request being processed
- vertx_sql_processing_time: requests latencies