Class JettyClientKeyValues
java.lang.Object
io.micrometer.core.instrument.binder.jetty.JettyClientKeyValues
Factory methods for
KeyValue associated with a request-response exchange that
is handled by Jetty HttpClient.- Since:
- 1.11.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.micrometer.common.KeyValueexception(org.eclipse.jetty.client.api.Result result) static io.micrometer.common.KeyValuehost(org.eclipse.jetty.client.api.Request request) Creates ahostKeyValue based on theRequest.getHost()of the givenrequest.static io.micrometer.common.KeyValuemethod(org.eclipse.jetty.client.api.Request request) Creates amethodKeyValue based on themethodof the givenrequest.static io.micrometer.common.KeyValueoutcome(org.eclipse.jetty.client.api.Result result) Creates anoutcomeKeyValue based on the status of the givenresult.static io.micrometer.common.KeyValuestatus(org.eclipse.jetty.client.api.Result result) Creates astatusKeyValue based on the status of the givenresult.static io.micrometer.common.KeyValueuri(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 auriKeyValue based on the URI of the givenresult.
-
Method Details
-
method
public static io.micrometer.common.KeyValue method(org.eclipse.jetty.client.api.Request request) Creates amethodKeyValue based on themethodof the givenrequest.- 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 ahostKeyValue based on theRequest.getHost()of the givenrequest.- 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 astatusKeyValue based on the status of the givenresult.- 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 auriKeyValue based on the URI of the givenresult.REDIRECTIONfor 3xx responses,NOT_FOUNDfor 404 responses.- Parameters:
request- the requestresult- the request resultsuccessfulUriPattern- 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) - 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 anoutcomeKeyValue based on the status of the givenresult.- Parameters:
result- the request result- Returns:
- the outcome KeyValue derived from the status of the response
-