tritium
tritium copied to clipboard
Add `@SlowLog(duration,unit)` annotation
From @markelliot: I'd like to annotate some methods with @SlowLog(duration,unit) such that if the method takes longer than that execute we log the method and the parameters to record that it ran slower than expected.
A similar enhancement would be to do this for slowest 1% of method calls.
@ellisjoe @ash211 for SA
this would be great
Interested in feedback on what logger this would go to, at what level, and if you'd annotate the instrumented interface and/or implementation?
think for services we'll want to stick them on the implementation. the service interfaces currently just define the rest api and this seems like something directly related to a specific implementation anyway.
if we're logging just the slowest 1% we should likely log at INFO. if we we're able to log calls that appear to be outliers, think those would be better logged at WARN (taking the stance that WARN logs are something we should take a look at within a day or so).
could see this being logged to the same place as the rest of metrics or it's own file. don't have a strong opinion there.