Class HandlerParser
- java.lang.Object
-
- org.springframework.cloud.sleuth.instrument.web.mvc.HandlerParser
-
public class HandlerParser extends Object
Spring MVC specific type used to customize traced requests based on the handler.Note: This should not duplicate data. For example, this should not add the tag "http.url".
Tagging policy adopted from spring cloud sleuth 1.3.x
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTROLLER_CLASSSimple class name that processed the request.static StringCONTROLLER_METHODMethod name that processed the request.static HandlerParserNOOPAdds no tags to the span representing the request.
-
Constructor Summary
Constructors Constructor Description HandlerParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidpostHandle(javax.servlet.http.HttpServletRequest request, Object handler, org.springframework.web.servlet.ModelAndView modelAndView, SpanCustomizer customizer)Invoked posterior to request invocation duringHandlerInterceptor.postHandle(HttpServletRequest, HttpServletResponse, Object, ModelAndView).protected voidpreHandle(javax.servlet.http.HttpServletRequest request, Object handler, SpanCustomizer customizer)Invoked prior to request invocation duringHandlerInterceptor.preHandle(HttpServletRequest, HttpServletResponse, Object).
-
-
-
Field Detail
-
NOOP
public static final HandlerParser NOOP
Adds no tags to the span representing the request.
-
CONTROLLER_CLASS
public static final String CONTROLLER_CLASS
Simple class name that processed the request. ex BookController
-
CONTROLLER_METHOD
public static final String CONTROLLER_METHOD
Method name that processed the request. ex listOfBooks
-
-
Method Detail
-
preHandle
protected void preHandle(javax.servlet.http.HttpServletRequest request, Object handler, SpanCustomizer customizer)Invoked prior to request invocation duringHandlerInterceptor.preHandle(HttpServletRequest, HttpServletResponse, Object).Adds the tags
CONTROLLER_CLASSandCONTROLLER_METHOD. Override or useNOOPto change this behavior.- Parameters:
request- requesthandler- handlercustomizer- span customizer
-
postHandle
protected void postHandle(javax.servlet.http.HttpServletRequest request, Object handler, org.springframework.web.servlet.ModelAndView modelAndView, SpanCustomizer customizer)Invoked posterior to request invocation duringHandlerInterceptor.postHandle(HttpServletRequest, HttpServletResponse, Object, ModelAndView).- Parameters:
request- requesthandler- handlercustomizer- span customizer
-
-