Class JettyClientTags

java.lang.Object
io.micrometer.core.instrument.binder.jetty.JettyClientTags

public final class JettyClientTags extends Object
Factory methods for Tags associated with a request-response exchange that is handled by Jetty HttpClient.
Since:
1.5.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static Tag
    exception(org.eclipse.jetty.client.api.Result result)
    Creates an exception tag based on the simple name of the class of the given exception.
    static Tag
    host(org.eclipse.jetty.client.api.Request request)
    Creates a host tag based on the Request.getHost() of the given request.
    static Tag
    method(org.eclipse.jetty.client.api.Request request)
    Creates a method tag based on the method of the given request.
    static Tag
    outcome(org.eclipse.jetty.client.api.Result result)
    Creates an outcome tag based on the status of the given result.
    static Tag
    status(org.eclipse.jetty.client.api.Result result)
    Creates a status tag based on the status of the given result.
    static Tag
    uri(org.eclipse.jetty.client.api.Result result, Function<org.eclipse.jetty.client.api.Result,String> successfulUriPattern)
    Creates a uri tag based on the URI of the given result.

    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.eclipse.jetty.client.api.Request 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).
    • host

      public static Tag host(org.eclipse.jetty.client.api.Request request)
      Creates a host tag based on the Request.getHost() of the given request.
      Parameters:
      request - the request
      Returns:
      the host tag derived from request
      Since:
      1.7.0
    • status

      public static Tag status(org.eclipse.jetty.client.api.Result result)
      Creates a status tag based on the status of the given result.
      Parameters:
      result - the request result
      Returns:
      the status tag derived from the status of the response
    • uri

      public static Tag uri(org.eclipse.jetty.client.api.Result result, Function<org.eclipse.jetty.client.api.Result,String> successfulUriPattern)
      Creates a uri tag based on the URI of the given result. REDIRECTION for 3xx responses, NOT_FOUND for 404 responses.
      Parameters:
      result - the request result
      successfulUriPattern - successful URI pattern
      Returns:
      the uri tag derived from the request result
    • exception

      public static Tag exception(org.eclipse.jetty.client.api.Result result)
      Creates an exception tag based on the simple name of the class of the given exception.
      Parameters:
      result - the request result
      Returns:
      the exception tag derived from the exception
    • outcome

      public static Tag outcome(org.eclipse.jetty.client.api.Result result)
      Creates an outcome tag based on the status of the given result.
      Parameters:
      result - the request result
      Returns:
      the outcome tag derived from the status of the response