Class RestTemplateExchangeTags

java.lang.Object
org.springframework.boot.actuate.metrics.web.client.RestTemplateExchangeTags

public final class RestTemplateExchangeTags extends Object
Factory methods for creating Tags related to a request-response exchange performed by a RestTemplate.
Since:
2.0.0
Author:
Andy Wilkinson, Jon Schneider, Nishant Raut, Brian Clozel
  • Method Details

    • method

      public static io.micrometer.core.instrument.Tag method(HttpRequest request)
      Creates a method Tag for the method of the given request.
      Parameters:
      request - the request
      Returns:
      the method tag
    • uri

      public static io.micrometer.core.instrument.Tag uri(HttpRequest request)
      Creates a uri Tag for the URI of the given request.
      Parameters:
      request - the request
      Returns:
      the uri tag
    • uri

      public static io.micrometer.core.instrument.Tag uri(String uriTemplate)
      Creates a uri Tag from the given uriTemplate.
      Parameters:
      uriTemplate - the template
      Returns:
      the uri tag
    • status

      public static io.micrometer.core.instrument.Tag status(ClientHttpResponse response)
      Creates a status Tag derived from the status of the given response.
      Parameters:
      response - the response
      Returns:
      the status tag
    • clientName

      public static io.micrometer.core.instrument.Tag clientName(HttpRequest request)
      Create a clientName Tag derived from the host of the URI of the given request.
      Parameters:
      request - the request
      Returns:
      the clientName tag
    • outcome

      public static io.micrometer.core.instrument.Tag outcome(ClientHttpResponse response)
      Creates an outcome Tag derived from the status of the given response.
      Parameters:
      response - the response
      Returns:
      the outcome tag
      Since:
      2.2.0