public class LongTaskTimingHandlerInterceptor extends Object implements HandlerInterceptor
HandlerInterceptor
that supports Micrometer's long task timers configured on
a handler using @Timed
with longTask
set to
true
.Constructor and Description |
---|
LongTaskTimingHandlerInterceptor(io.micrometer.core.instrument.MeterRegistry registry,
WebMvcTagsProvider tagsProvider)
Creates a new
LongTaskTimingHandlerInterceptor that will create
LongTaskTimers using the given registry. |
Modifier and Type | Method and Description |
---|---|
void |
afterCompletion(HttpServletRequest request,
HttpServletResponse response,
Object handler,
Exception ex) |
boolean |
preHandle(HttpServletRequest request,
HttpServletResponse response,
Object handler) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
postHandle
public LongTaskTimingHandlerInterceptor(io.micrometer.core.instrument.MeterRegistry registry, WebMvcTagsProvider tagsProvider)
LongTaskTimingHandlerInterceptor
that will create
LongTaskTimers
using the given registry. Timers will be
tagged using the given tagsProvider
.registry
- the registrytagsProvider
- the tags providerpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception
preHandle
in interface HandlerInterceptor
Exception
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception
afterCompletion
in interface HandlerInterceptor
Exception