Closed dkroehan closed 2 days ago
I couldn't find a hint about that in the micrometers docs.
This is because Micrometer does not depend on Spring, I don't think it should document the execution order of every annotation of every version of every library.
What I would like to achieve instead is the following order: ...
I think you should open an issue in spring-framework to change the order.
If there is already a way to achieve this, please let me know.
I'm not sure about this but maybe if you create the aspect beans on your own and add an @Order
annotation to them, that might have an effect on the proxying order. This question would also belong to the issue tracker of Spring Framework.
Please describe the feature request. I use micrometer in a Spring Boot application to measure the execution time of a method. Given the following (Kotlin) method:
I would expect that the
@Timed
annotation measures the total time that the method execution takes including the@Transactional
handling. I compared it to measuring the time outside, as in the following example:Since the time measuring is different I did some debugging and found out that the underlying
TimedAspect
runs after the@Transactional
processing, which means the order is as follows:I couldn't find a hint about that in the micrometers docs.
What I would like to achieve instead is the following order:
If there is already a way to achieve this, please let me know.