sqlx icon indicating copy to clipboard operation
sqlx copied to clipboard

Add middleware for each request

Open Walfal opened this issue 3 months ago • 0 comments

I have found these related issues/pull requests

I’ve not found any related issue (for the moment)

Description

In order to track metrics for my app, would it be possible to have a middleware triggered for each request like Intercept for RBatis?

It would enable to count calls to db, ok and error responses, and the elapsed time for each request. This way, we could detect if there is a issue occuring.

Prefered solution

Something like RBatis::plugin::intercept

Is this a breaking change? Why or why not?

No

Walfal avatar Nov 13 '25 14:11 Walfal