Class HttpRequestTags

java.lang.Object
io.micrometer.core.instrument.binder.http.HttpRequestTags

@Incubating(since="1.4.0") public class HttpRequestTags extends Object
Tags for HTTP requests.
Since:
1.4.0
  • Method Details

    • method

      public static Tag method(javax.servlet.http.HttpServletRequest request)
      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).
    • method

      @Deprecated public static Tag method(jakarta.servlet.http.HttpServletRequest request)
      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).
      Since:
      1.10.0
    • status

      public static Tag status(javax.servlet.http.HttpServletResponse response)
      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
    • status

      @Deprecated public static Tag status(jakarta.servlet.http.HttpServletResponse response)
      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
      Since:
      1.10.0
    • exception

      public static Tag exception(Throwable exception)
      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 Tag outcome(javax.servlet.http.HttpServletResponse response)
      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
    • outcome

      @Deprecated public static Tag outcome(jakarta.servlet.http.HttpServletResponse response)
      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:
      1.10.0