Package brave.spring.webmvc
Class HandlerParser
java.lang.Object
brave.spring.webmvc.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 added by HttpTracing. 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
Modifier and Type Method Description protected voidpreHandle(javax.servlet.http.HttpServletRequest request, Object handler, SpanCustomizer customizer)Invoked prior to request invocation duringHandlerInterceptor.preHandle(HttpServletRequest, HttpServletResponse, Object).
-
Field Details
-
NOOP
Adds no tags to the span representing the request. -
CONTROLLER_CLASS
Simple class name that processed the request. ex BookController- See Also:
- Constant Field Values
-
CONTROLLER_METHOD
Method name that processed the request. ex listOfBooks- See Also:
- Constant Field Values
-
-
Constructor Details
-
HandlerParser
public HandlerParser()
-
-
Method Details
-
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.
-