Hi, I'm thinking of an addition to the sql package. I like to call an interceptor on each completed statement. I'm interested in timing information (prometheus in my case) and status codes. There may be other useful information, such as, number of rows (for "selects"), which we could make available in the interceptor.
Of course, one could wrap each statement with that information, but my intention is to have a library, which makes a sql.DB available and has the interceptor set up already. The benefit is, that monitoring of sql statements would be automatically added to every service without extra development effort. We do have many services and the library would provide the consistency to automatically add the monitoring to each service of our database(s). Technically, I'm thinking to implement it with a similar syntax to the grpc UnaryInterceptor <https://github.com/grpc-ecosystem/go-grpc-middleware>. AFAICT this would keep full backwards compatibility. Wdyt? Is that a patch that would be acceptable and generally useful? Conrad -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.