public final class WebMvcTags extends Object
Tags
associated with a request-response exchange that
is handled by Spring MVC.Modifier and Type | Method and Description |
---|---|
static io.micrometer.core.instrument.Tag |
exception(Throwable exception)
|
static io.micrometer.core.instrument.Tag |
method(javax.servlet.http.HttpServletRequest request)
Creates a
method tag based on the method of the given request . |
static io.micrometer.core.instrument.Tag |
outcome(javax.servlet.http.HttpServletResponse response)
Creates an
outcome tag based on the status of the given response . |
static io.micrometer.core.instrument.Tag |
status(javax.servlet.http.HttpServletResponse response)
Creates a
status tag based on the status of the given response . |
static io.micrometer.core.instrument.Tag |
uri(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Creates a
uri tag based on the URI of the given request . |
public static io.micrometer.core.instrument.Tag method(javax.servlet.http.HttpServletRequest request)
method
tag based on the method
of the given request
.request
- the requestpublic static io.micrometer.core.instrument.Tag status(javax.servlet.http.HttpServletResponse response)
status
tag based on the status of the given response
.response
- the HTTP responsepublic static io.micrometer.core.instrument.Tag uri(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
uri
tag based on the URI of the given request
. Uses the
HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE
best matching pattern if
available. Falling back to REDIRECTION
for 3xx responses, NOT_FOUND
for 404 responses, root
for requests with no path info, and UNKNOWN
for all other requests.request
- the requestresponse
- the responsepublic static io.micrometer.core.instrument.Tag exception(Throwable exception)
exception
- the exception, may be null
public static io.micrometer.core.instrument.Tag outcome(javax.servlet.http.HttpServletResponse response)
outcome
tag based on the status of the given response
.response
- the HTTP responseCopyright © 2020 Pivotal Software, Inc.. All rights reserved.