It would be valuable to have timer instrumentation on all children of the Spring Data Repository interface. Metric name along the lines of of spring.data.repository with tags for method name (save, findOne, exists, etc.) and success/failure.
Discussed this with Adrian and Marcin. Zipkin's Brave provides p6spy tracing. To the extent you are willing to add a p6spy layer between your app and driver, we could take advantage of this.
That'd be excellent for tracing, but I think not very good for readable metric names. It seems to be tracking things at the query level, whereas the interface methods put a much more accessible name on top of those (likely verbose) queries.
PersonController.getById vs select * from person where id=%id.
Also, this looks limited to jdbc whereas I'd want to cover the full suite of Spring Data techs, (redis, cassandra, etc.)
Feels like that might be better in a spring-cloud-sleuth-extensions project for the tracing benefits.
We created similar to #500 interceptor especially for spring data use case, probably you can at least copy it to your project.
Hi, is there any progress on this? This issue is open for a while now and very interesting for us as we could get rid of some Workarounds
I'm interested in something similar for use with Retrofit2.
This seems to be resolved via https://github.com/spring-projects/spring-boot/issues/22217.
Closing this since it suppose to go out with Spring Boot 2.5.0-RC1 (2.5.0).
Most helpful comment
Hi, is there any progress on this? This issue is open for a while now and very interesting for us as we could get rid of some Workarounds