Class 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 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
        See Also:
        Constant Field Values
      • CONTROLLER_METHOD

        public static final String CONTROLLER_METHOD
        Method name that processed the request. ex listOfBooks
        See Also:
        Constant Field Values
    • Constructor Detail

      • HandlerParser

        public HandlerParser()
    • Method Detail

      • preHandle

        protected void preHandle​(javax.servlet.http.HttpServletRequest request,
                                 Object handler,
                                 SpanCustomizer customizer)
        Invoked prior to request invocation during HandlerInterceptor.preHandle(HttpServletRequest, HttpServletResponse, Object).

        Adds the tags CONTROLLER_CLASS and CONTROLLER_METHOD. Override or use NOOP to change this behavior.