Class RestTemplateExchangeTags


  • public final class RestTemplateExchangeTags
    extends java.lang.Object
    Factory methods for creating Tags related to a request-response exchange performed by a RestTemplate.
    • 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 a clientName Tag derived from the host of the URI of the given request.
      static io.micrometer.core.instrument.Tag method​(org.springframework.http.HttpRequest request)
      Creates a method Tag for the method of the given request.
      static io.micrometer.core.instrument.Tag outcome​(org.springframework.http.client.ClientHttpResponse response)
      Creates an outcome Tag derived from the status of the given response.
      static io.micrometer.core.instrument.Tag status​(org.springframework.http.client.ClientHttpResponse response)
      Creates a status Tag derived from the status of the given response.
      static io.micrometer.core.instrument.Tag uri​(java.lang.String uriTemplate)
      Creates a uri Tag from the given uriTemplate.
      static io.micrometer.core.instrument.Tag uri​(org.springframework.http.HttpRequest request)
      Creates a uri Tag for the URI of the given request.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • method

        public static io.micrometer.core.instrument.Tag method​(org.springframework.http.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​(org.springframework.http.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​(java.lang.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​(@Nullable
                                                               org.springframework.http.client.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​(org.springframework.http.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​(org.springframework.http.client.ClientHttpResponse response)
        Creates an outcome Tag derived from the status of the given response.
        Parameters:
        response - the response
        Returns:
        the outcome tag
        Since:
        1.1.2