问题
micrometer:timer measure time cross two routes
I am using micrometer to measure time for route A and route B it works, I also want to measure total time for routeA and routeB since data flow is from routeA -> routeB. but it does not work. Below is the snippet of my code
Any hints or suggestions are more than welcome!
from("amq:queue:testqueue")
.routeId("routeA")
.to("micrometer:timer:timer.routeA?action=start")
.to("micrometer:timer:timer.total?action=start")
//some steps in between
.to("micrometer:timer:cloudia.timer.routeA?action=stop")
.to("direct:direct_for_routeB")
from("direct_for_routeB")
.routeId("routeB")
.to("micrometer:timer:cloudia.timer.routeB?action=start")
// some steps in between
.to("micrometer:timer:cloudia.timer.routeB?action=stop")
.to("micrometer:timer:timer.total?action=stop")
来源:https://stackoverflow.com/questions/58568181/micrometertimer-measure-time-cross-two-routes