java.lang.Object
org.springframework.boot.actuate.metrics.web.servlet.WebMvcTags

@Deprecated(since="3.0.0", forRemoval=true) public final class WebMvcTags extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
since 3.0.0 for removal in 3.2.0 in favor of ServerRequestObservationConvention
Factory methods for Tags associated with a request-response exchange that is handled by Spring MVC.
Since:
2.0.0
Author:
Jon Schneider, Andy Wilkinson, Brian Clozel, Michael McFadyen
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.micrometer.core.instrument.Tag
    exception(Throwable exception)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates an exception tag based on the simple name of the class of the given exception.
    static io.micrometer.core.instrument.Tag
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a method tag based on the method of the given request.
    static io.micrometer.core.instrument.Tag
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates an outcome tag based on the status of the given response.
    static io.micrometer.core.instrument.Tag
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a status tag based on the status of the given response.
    static io.micrometer.core.instrument.Tag
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a uri tag based on the URI of the given request.
    static io.micrometer.core.instrument.Tag
    uri(HttpServletRequest request, HttpServletResponse response, boolean ignoreTrailingSlash)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a uri tag based on the URI of the given request.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • method

      public static io.micrometer.core.instrument.Tag method(HttpServletRequest request)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a method tag based on the method of the given request.
      Parameters:
      request - the request
      Returns:
      the method tag whose value is a capitalized method (e.g. GET).
    • status

      public static io.micrometer.core.instrument.Tag status(HttpServletResponse response)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a status tag based on the status of the given response.
      Parameters:
      response - the HTTP response
      Returns:
      the status tag derived from the status of the response
    • uri

      public static io.micrometer.core.instrument.Tag uri(HttpServletRequest request, HttpServletResponse response)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.
      Parameters:
      request - the request
      response - the response
      Returns:
      the uri tag derived from the request
    • uri

      public static io.micrometer.core.instrument.Tag uri(HttpServletRequest request, HttpServletResponse response, boolean ignoreTrailingSlash)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.
      Parameters:
      request - the request
      response - the response
      ignoreTrailingSlash - whether to ignore the trailing slash
      Returns:
      the uri tag derived from the request
    • exception

      public static io.micrometer.core.instrument.Tag exception(Throwable exception)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates an exception tag based on the simple name of the class of the given exception.
      Parameters:
      exception - the exception, may be null
      Returns:
      the exception tag derived from the exception
    • outcome

      public static io.micrometer.core.instrument.Tag outcome(HttpServletResponse response)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates an outcome tag based on the status of the given response.
      Parameters:
      response - the HTTP response
      Returns:
      the outcome tag derived from the status of the response
      Since:
      2.1.0