Package io.micrometer.spring.web.client
Class RestTemplateExchangeTags
- java.lang.Object
-
- io.micrometer.spring.web.client.RestTemplateExchangeTags
-
public final class RestTemplateExchangeTags extends java.lang.Object
Factory methods for creatingTags
related to a request-response exchange performed by aRestTemplate
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.micrometer.core.instrument.Tag
clientName(org.springframework.http.HttpRequest request)
Create aclientName
Tag
derived from thehost
of theURI
of the givenrequest
.static io.micrometer.core.instrument.Tag
method(org.springframework.http.HttpRequest request)
Creates amethod
Tag
for themethod
of the givenrequest
.static io.micrometer.core.instrument.Tag
outcome(org.springframework.http.client.ClientHttpResponse response)
Creates anoutcome
Tag
derived from thestatus
of the givenresponse
.static io.micrometer.core.instrument.Tag
status(org.springframework.http.client.ClientHttpResponse response)
Creates astatus
Tag
derived from thestatus
of the givenresponse
.static io.micrometer.core.instrument.Tag
uri(java.lang.String uriTemplate)
Creates auri
Tag
from the givenuriTemplate
.static io.micrometer.core.instrument.Tag
uri(org.springframework.http.HttpRequest request)
Creates auri
Tag
for the URI of the givenrequest
.
-
-
-
Method Detail
-
method
public static io.micrometer.core.instrument.Tag method(org.springframework.http.HttpRequest request)
Creates amethod
Tag
for themethod
of the givenrequest
.- Parameters:
request
- the request- Returns:
- the method tag
-
uri
public static io.micrometer.core.instrument.Tag uri(org.springframework.http.HttpRequest request)
Creates auri
Tag
for the URI of the givenrequest
.- Parameters:
request
- the request- Returns:
- the uri tag
-
uri
public static io.micrometer.core.instrument.Tag uri(java.lang.String uriTemplate)
Creates auri
Tag
from the givenuriTemplate
.- Parameters:
uriTemplate
- the template- Returns:
- the uri tag
-
status
public static io.micrometer.core.instrument.Tag status(@Nullable org.springframework.http.client.ClientHttpResponse response)
Creates astatus
Tag
derived from thestatus
of the givenresponse
.- Parameters:
response
- the response- Returns:
- the status tag
-
clientName
public static io.micrometer.core.instrument.Tag clientName(org.springframework.http.HttpRequest request)
Create aclientName
Tag
derived from thehost
of theURI
of the givenrequest
.- Parameters:
request
- the request- Returns:
- the clientName tag
-
outcome
public static io.micrometer.core.instrument.Tag outcome(org.springframework.http.client.ClientHttpResponse response)
Creates anoutcome
Tag
derived from thestatus
of the givenresponse
.- Parameters:
response
- the response- Returns:
- the outcome tag
- Since:
- 1.1.2
-
-