Class HandlerParser


  • public class HandlerParser
    extends java.lang.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 java.lang.String CONTROLLER_CLASS
      Simple class name that processed the request.
      static java.lang.String CONTROLLER_METHOD
      Method name that processed the request.
      static HandlerParser NOOP
      Adds 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 void preHandle​(javax.servlet.http.HttpServletRequest request, java.lang.Object handler, SpanCustomizer customizer)
      Invoked prior to request invocation during HandlerInterceptor.preHandle(HttpServletRequest, HttpServletResponse, Object).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NOOP

        public static final HandlerParser NOOP
        Adds no tags to the span representing the request.
      • CONTROLLER_CLASS

        public static final java.lang.String CONTROLLER_CLASS
        Simple class name that processed the request. ex BookController
        See Also:
        Constant Field Values
      • CONTROLLER_METHOD

        public static final java.lang.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,
                                 java.lang.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.