Class JettyClientKeyValues

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

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

    Modifier and Type
    Method
    Description
    static io.micrometer.common.KeyValue
    exception(org.eclipse.jetty.client.api.Result result)
    Creates an exception KeyValue based on the simple name of the class of the given exception.
    static io.micrometer.common.KeyValue
    host(org.eclipse.jetty.client.api.Request request)
    Creates a host KeyValue based on the Request.getHost() of the given request.
    static io.micrometer.common.KeyValue
    method(org.eclipse.jetty.client.api.Request request)
    Creates a method KeyValue based on the method of the given request.
    static io.micrometer.common.KeyValue
    outcome(org.eclipse.jetty.client.api.Result result)
    Creates an outcome KeyValue based on the status of the given result.
    static io.micrometer.common.KeyValue
    status(org.eclipse.jetty.client.api.Result result)
    Creates a status KeyValue based on the status of the given result.
    static io.micrometer.common.KeyValue
    uri(org.eclipse.jetty.client.api.Request request, org.eclipse.jetty.client.api.Result result, BiFunction<org.eclipse.jetty.client.api.Request,org.eclipse.jetty.client.api.Result,String> successfulUriPattern)
    Creates a uri KeyValue 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 io.micrometer.common.KeyValue method(org.eclipse.jetty.client.api.Request request)
      Creates a method KeyValue based on the method of the given request.
      Parameters:
      request - the request
      Returns:
      the method KeyValue whose value is a capitalized method (e.g. GET).
    • host

      public static io.micrometer.common.KeyValue host(org.eclipse.jetty.client.api.Request request)
      Creates a host KeyValue based on the Request.getHost() of the given request.
      Parameters:
      request - the request
      Returns:
      the host KeyValue derived from request
    • status

      public static io.micrometer.common.KeyValue status(@Nullable org.eclipse.jetty.client.api.Result result)
      Creates a status KeyValue based on the status of the given result.
      Parameters:
      result - the request result
      Returns:
      the status KeyValue derived from the status of the response
    • uri

      public static io.micrometer.common.KeyValue uri(org.eclipse.jetty.client.api.Request request, @Nullable org.eclipse.jetty.client.api.Result result, BiFunction<org.eclipse.jetty.client.api.Request,org.eclipse.jetty.client.api.Result,String> successfulUriPattern)
      Creates a uri KeyValue based on the URI of the given result. REDIRECTION for 3xx responses, NOT_FOUND for 404 responses.
      Parameters:
      request - the request
      result - the request result
      successfulUriPattern - successful URI pattern
      Returns:
      the uri KeyValue derived from the request and its result
    • exception

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

      public static io.micrometer.common.KeyValue outcome(@Nullable org.eclipse.jetty.client.api.Result result)
      Creates an outcome KeyValue based on the status of the given result.
      Parameters:
      result - the request result
      Returns:
      the outcome KeyValue derived from the status of the response