类 WebMvcTags


  • public final class WebMvcTags
    extends Object
    Factory methods for Tags associated with a request-response exchange that is handled by Spring MVC.
    从以下版本开始:
    2.0.0
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型方法说明
      static io.micrometer.core.instrument.Tagexception​(Throwable exception)
      Creates a exception tag based on the simple name of the class of the given exception.
      static io.micrometer.core.instrument.Tagmethod​(javax.servlet.http.HttpServletRequest request)
      Creates a method tag based on the method of the given request.
      static io.micrometer.core.instrument.Tagoutcome​(javax.servlet.http.HttpServletResponse response)
      Creates an outcome tag based on the status of the given response.
      static io.micrometer.core.instrument.Tagstatus​(javax.servlet.http.HttpServletResponse response)
      Creates a status tag based on the status of the given response.
      static io.micrometer.core.instrument.Taguri​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Creates a uri tag based on the URI of the given request.
    • 方法详细资料

      • method

        public static io.micrometer.core.instrument.Tag method​(javax.servlet.http.HttpServletRequest request)
        Creates a method tag based on the method of the given request.
        参数:
        request - the request
        返回:
        the method tag whose value is a capitalized method (e.g. GET).
      • status

        public static io.micrometer.core.instrument.Tag status​(javax.servlet.http.HttpServletResponse response)
        Creates a status tag based on the status of the given response.
        参数:
        response - the HTTP response
        返回:
        the status tag derived from the status of the response
      • uri

        public static io.micrometer.core.instrument.Tag uri​(javax.servlet.http.HttpServletRequest request,
                                                            javax.servlet.http.HttpServletResponse response)
        Creates a uri tag based on the URI of the given request. Uses the HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE best matching pattern if available. Falling back to REDIRECTION for 3xx responses, NOT_FOUND for 404 responses, root for requests with no path info, and UNKNOWN for all other requests.
        参数:
        request - the request
        response - the response
        返回:
        the uri tag derived from the request
      • exception

        public static io.micrometer.core.instrument.Tag exception​(Throwable exception)
        Creates a exception tag based on the simple name of the class of the given exception.
        参数:
        exception - the exception, may be null
        返回:
        the exception tag derived from the exception
      • outcome

        public static io.micrometer.core.instrument.Tag outcome​(javax.servlet.http.HttpServletResponse response)
        Creates an outcome tag based on the status of the given response.
        参数:
        response - the HTTP response
        返回:
        the outcome tag derived from the status of the response
        从以下版本开始:
        2.1.0