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 Tag
exception(java.lang.Throwable exception)
Creates aexception
tag based on thesimple name
of the class of the givenexception
.static Tag
method(javax.servlet.http.HttpServletRequest request)
Creates amethod
tag based on themethod
of the givenrequest
.static Tag
outcome(javax.servlet.http.HttpServletResponse response)
Creates anoutcome
tag based on the status of the givenresponse
.static Tag
status(javax.servlet.http.HttpServletResponse response)
Creates astatus
tag based on the status of the givenresponse
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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).
-
status
Creates astatus
tag 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 aexception
tag based on thesimple name
of the class of the givenexception
.- Parameters:
exception
- the exception, may benull
- Returns:
- the exception tag derived from the exception
-
outcome
Creates anoutcome
tag based on the status of the givenresponse
.- Parameters:
response
- the HTTP response- Returns:
- the outcome tag derived from the status of the response
-