Class JettyClientTags
java.lang.Object
io.micrometer.core.instrument.binder.jetty.JettyClientTags
Factory methods for
Tags
associated with a request-response exchange that
is handled by Jetty HttpClient
.- Since:
- 1.5.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic Tag
exception
(org.eclipse.jetty.client.api.Result result) static Tag
host
(org.eclipse.jetty.client.api.Request request) Creates ahost
tag based on theRequest.getHost()
of the givenrequest
.static Tag
method
(org.eclipse.jetty.client.api.Request request) Creates amethod
tag based on themethod
of the givenrequest
.static Tag
outcome
(org.eclipse.jetty.client.api.Result result) Creates anoutcome
tag based on the status of the givenresult
.static Tag
status
(org.eclipse.jetty.client.api.Result result) Creates astatus
tag based on the status of the givenresult
.static Tag
uri
(org.eclipse.jetty.client.api.Result result, Function<org.eclipse.jetty.client.api.Result, String> successfulUriPattern) Creates auri
tag based on the URI of the givenresult
.
-
Method Details
-
method
Creates amethod
tag based on themethod
of the givenrequest
.- Parameters:
request
- the request- Returns:
- the method tag whose value is a capitalized method (e.g. GET).
-
host
Creates ahost
tag based on theRequest.getHost()
of the givenrequest
.- Parameters:
request
- the request- Returns:
- the host tag derived from request
- Since:
- 1.7.0
-
status
Creates astatus
tag based on the status of the givenresult
.- 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 auri
tag based on the URI of the givenresult
.REDIRECTION
for 3xx responses,NOT_FOUND
for 404 responses.- Parameters:
result
- the request resultsuccessfulUriPattern
- successful URI pattern- Returns:
- the uri tag derived from the request result
-
exception
- Parameters:
result
- the request result- Returns:
- the exception tag derived from the exception
-
outcome
Creates anoutcome
tag based on the status of the givenresult
.- Parameters:
result
- the request result- Returns:
- the outcome tag derived from the status of the response
-