类 RestTemplateExchangeTags
- java.lang.Object
- org.springframework.boot.actuate.metrics.web.client.RestTemplateExchangeTags
public final class RestTemplateExchangeTags extends Object
Factory methods for creatingTags
related to a request-response exchange performed by aRestTemplate
.- 从以下版本开始:
- 2.0.0
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static io.micrometer.core.instrument.Tag
clientName(org.springframework.http.HttpRequest request)
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
status(org.springframework.http.client.ClientHttpResponse response)
Creates astatus
Tag
derived from thestatus
of the givenresponse
.static io.micrometer.core.instrument.Tag
uri(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
public static io.micrometer.core.instrument.Tag method(org.springframework.http.HttpRequest request)
Creates amethod
Tag
for themethod
of the givenrequest
.- 参数:
request
- the request- 返回:
- 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
.- 参数:
request
- the request- 返回:
- the uri tag
uri
public static io.micrometer.core.instrument.Tag uri(String uriTemplate)
Creates auri
Tag
from the givenuriTemplate
.- 参数:
uriTemplate
- the template- 返回:
- the uri tag
status
public static io.micrometer.core.instrument.Tag status(org.springframework.http.client.ClientHttpResponse response)
Creates astatus
Tag
derived from thestatus
of the givenresponse
.- 参数:
response
- the response- 返回:
- the status tag
clientName
public static io.micrometer.core.instrument.Tag clientName(org.springframework.http.HttpRequest request)
- 参数:
request
- the request- 返回:
- the clientName tag