public class MetricsRestTemplateCustomizer extends Object implements RestTemplateCustomizer
RestTemplateCustomizer
that configures the RestTemplate
to record
request metrics.Constructor and Description |
---|
MetricsRestTemplateCustomizer(io.micrometer.core.instrument.MeterRegistry meterRegistry,
RestTemplateExchangeTagsProvider tagProvider,
String metricName)
Creates a new
MetricsRestTemplateInterceptor that will record metrics using
the given meterRegistry with tags provided by the given
tagProvider . |
Modifier and Type | Method and Description |
---|---|
void |
customize(org.springframework.web.client.RestTemplate restTemplate)
Callback to customize a
RestTemplate instance. |
public MetricsRestTemplateCustomizer(io.micrometer.core.instrument.MeterRegistry meterRegistry, RestTemplateExchangeTagsProvider tagProvider, String metricName)
MetricsRestTemplateInterceptor
that will record metrics using
the given meterRegistry
with tags provided by the given
tagProvider
.meterRegistry
- the meter registrytagProvider
- the tag providermetricName
- the name of the recorded metricpublic void customize(org.springframework.web.client.RestTemplate restTemplate)
RestTemplateCustomizer
RestTemplate
instance.customize
in interface RestTemplateCustomizer
restTemplate
- the template to customizeCopyright © 2019 Pivotal Software, Inc.. All rights reserved.