Class JerseyTags
- java.lang.Object
-
- org.glassfish.jersey.micrometer.server.JerseyTags
-
public final class JerseyTags extends Object
Factory methods forTagsassociated with a request-response exchange that is handled by Jersey server.- Since:
- 2.41
- Author:
- Michael Weirauch, Johnny Lim
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.micrometer.core.instrument.Tagexception(RequestEvent event)static io.micrometer.core.instrument.Tagmethod(ContainerRequest request)static io.micrometer.core.instrument.Tagoutcome(ContainerResponse response)Creates anoutcometag based on the status of the givenresponse.static io.micrometer.core.instrument.Tagstatus(ContainerResponse response)Creates astatustag based on the status of the givenresponse.static io.micrometer.core.instrument.Taguri(RequestEvent event)Creates auritag based on the URI of the givenevent.
-
-
-
Method Detail
-
method
public static io.micrometer.core.instrument.Tag method(ContainerRequest request)
- Parameters:
request- the container request- Returns:
- the method tag whose value is a capitalized method (e.g. GET).
-
status
public static io.micrometer.core.instrument.Tag status(ContainerResponse response)
Creates astatustag based on the status of the givenresponse.- Parameters:
response- the container response- Returns:
- the status tag derived from the status of the response
-
uri
public static io.micrometer.core.instrument.Tag uri(RequestEvent event)
Creates auritag based on the URI of the givenevent. Uses theExtendedUriInfo.getMatchedTemplates()if available.REDIRECTIONfor 3xx responses,NOT_FOUNDfor 404 responses.- Parameters:
event- the request event- Returns:
- the uri tag derived from the request event
-
exception
public static io.micrometer.core.instrument.Tag exception(RequestEvent event)
- Parameters:
event- the request event- Returns:
- the exception tag derived from the exception
-
outcome
public static io.micrometer.core.instrument.Tag outcome(ContainerResponse response)
Creates anoutcometag based on the status of the givenresponse.- Parameters:
response- the container response- Returns:
- the outcome tag derived from the status of the response
-
-