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.KeyValue
exception
(org.eclipse.jetty.client.api.Result result) static io.micrometer.common.KeyValue
host
(org.eclipse.jetty.client.api.Request request) Creates ahost
KeyValue based on theRequest.getHost()
of the givenrequest
.static io.micrometer.common.KeyValue
method
(org.eclipse.jetty.client.api.Request request) Creates amethod
KeyValue based on themethod
of the givenrequest
.static io.micrometer.common.KeyValue
outcome
(org.eclipse.jetty.client.api.Result result) Creates anoutcome
KeyValue based on the status of the givenresult
.static io.micrometer.common.KeyValue
status
(org.eclipse.jetty.client.api.Result result) Creates astatus
KeyValue based on the status of the givenresult
.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 auri
KeyValue 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 amethod
KeyValue based on themethod
of 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 ahost
KeyValue 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 astatus
KeyValue 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 auri
KeyValue based on the URI of the givenresult
.REDIRECTION
for 3xx responses,NOT_FOUND
for 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 anoutcome
KeyValue based on the status of the givenresult
.- Parameters:
result
- the request result- Returns:
- the outcome KeyValue derived from the status of the response
-