Class HttpJakartaServletRequestTags

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

@Incubating(since="1.12.0") public class HttpJakartaServletRequestTags extends Object
Tags for HTTP Jakarta requests.
Since:
1.12.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static Tag
    exception(Throwable exception)
    Creates an exception tag based on the simple name of the class of the given exception.
    static Tag
    method(jakarta.servlet.http.HttpServletRequest request)
    Creates a method tag based on the method of the given request.
    static Tag
    outcome(jakarta.servlet.http.HttpServletResponse response)
    Creates an outcome tag based on the status of the given response.
    static Tag
    status(jakarta.servlet.http.HttpServletResponse response)
    Creates a status tag based on the status of the given response.

    Methods inherited from class java.lang.Object

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

    • method

      public static Tag method(@Nullable 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).
    • status

      public static Tag status(@Nullable 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
    • exception

      public static Tag exception(@Nullable 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(@Nullable 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