java.lang.Object
io.micrometer.core.instrument.binder.jersey.server.JerseyTags

public final class JerseyTags extends Object
Factory methods for Tags associated with a request-response exchange that is handled by Jersey server.
Since:
1.8.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static Tag
    exception(org.glassfish.jersey.server.monitoring.RequestEvent event)
    Creates a exception tag based on the simple name of the class of the given exception.
    static Tag
    method(org.glassfish.jersey.server.ContainerRequest request)
    Creates a method tag based on the method of the given request.
    static Tag
    outcome(org.glassfish.jersey.server.ContainerResponse response)
    Creates an outcome tag based on the status of the given response.
    static Tag
    status(org.glassfish.jersey.server.ContainerResponse response)
    Creates a status tag based on the status of the given response.
    static Tag
    uri(org.glassfish.jersey.server.monitoring.RequestEvent event)
    Creates a uri tag based on the URI of the given event.

    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(org.glassfish.jersey.server.ContainerRequest request)
      Creates a method tag based on the method of the given request.
      Parameters:
      request - the container request
      Returns:
      the method tag whose value is a capitalized method (e.g. GET).
    • status

      public static Tag status(org.glassfish.jersey.server.ContainerResponse response)
      Creates a status tag based on the status of the given response.
      Parameters:
      response - the container response
      Returns:
      the status tag derived from the status of the response
    • uri

      public static Tag uri(org.glassfish.jersey.server.monitoring.RequestEvent event)
      Creates a uri tag based on the URI of the given event. Uses the ExtendedUriInfo.getMatchedTemplates() if available. REDIRECTION for 3xx responses, NOT_FOUND for 404 responses.
      Parameters:
      event - the request event
      Returns:
      the uri tag derived from the request event
    • exception

      public static Tag exception(org.glassfish.jersey.server.monitoring.RequestEvent event)
      Creates a exception tag based on the simple name of the class of the given exception.
      Parameters:
      event - the request event
      Returns:
      the exception tag derived from the exception
    • outcome

      public static Tag outcome(org.glassfish.jersey.server.ContainerResponse response)
      Creates an outcome tag based on the status of the given response.
      Parameters:
      response - the container response
      Returns:
      the outcome tag derived from the status of the response