Class JettyClientTags
java.lang.Object
io.micrometer.core.instrument.binder.jetty.JettyClientTags
public final class JettyClientTags
extends java.lang.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 Tagexception(org.eclipse.jetty.client.api.Result result)Creates anexceptiontag based on thesimple nameof the class of the givenexception.static Tagmethod(org.eclipse.jetty.client.api.Request request)Creates amethodtag based on themethodof the givenrequest.static Tagoutcome(org.eclipse.jetty.client.api.Result result)Creates anoutcometag based on the status of the givenresult.static Tagstatus(org.eclipse.jetty.client.api.Result result)Creates astatustag based on the status of the givenresult.static Taguri(org.eclipse.jetty.client.api.Result result, java.util.function.Function<org.eclipse.jetty.client.api.Result,java.lang.String> successfulUriPattern)Creates auritag based on the URI of the givenresult.
-
Method Details
-
method
Creates amethodtag based on themethodof the givenrequest.- Parameters:
request- the request- Returns:
- the method tag whose value is a capitalized method (e.g. GET).
-
status
Creates astatustag 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, java.util.function.Function<org.eclipse.jetty.client.api.Result,java.lang.String> successfulUriPattern)Creates auritag based on the URI of the givenresult.REDIRECTIONfor 3xx responses,NOT_FOUNDfor 404 responses.- Parameters:
result- the request resultsuccessfulUriPattern- successful URI pattern- Returns:
- the uri tag derived from the request result
-
exception
Creates anexceptiontag based on thesimple nameof the class of the givenexception.- Parameters:
result- the request result- Returns:
- the exception tag derived from the exception
-
outcome
Creates anoutcometag based on the status of the givenresult.- Parameters:
result- the request result- Returns:
- the outcome tag derived from the status of the response
-