Class HttpRequestTags
java.lang.Object
io.micrometer.core.instrument.binder.http.HttpRequestTags
@Incubating(since="1.4.0") public class HttpRequestTags extends java.lang.Object
Tags for HTTP requests.
- Since:
- 1.4.0
-
Method Summary
Modifier and Type Method Description static Tagexception(java.lang.Throwable exception)Creates aexceptiontag based on thesimple nameof the class of the givenexception.static Tagmethod(javax.servlet.http.HttpServletRequest request)Creates amethodtag based on themethodof the givenrequest.static Tagoutcome(javax.servlet.http.HttpServletResponse response)Creates anoutcometag based on the status of the givenresponse.static Tagstatus(javax.servlet.http.HttpServletResponse response)Creates astatustag based on the status of the givenresponse.
-
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 givenresponse.- Parameters:
response- the HTTP response- Returns:
- the status tag derived from the status of the response
-
exception
Creates aexceptiontag based on thesimple nameof the class of the givenexception.- Parameters:
exception- the exception, may benull- Returns:
- the exception tag derived from the exception
-
outcome
Creates anoutcometag based on the status of the givenresponse.- Parameters:
response- the HTTP response- Returns:
- the outcome tag derived from the status of the response
-