Class 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
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static io.micrometer.core.instrument.TagclientName​(org.springframework.http.HttpRequest request)
      Create a clientNameTag derived from the host of the URI of the given request.
      static io.micrometer.core.instrument.Tagmethod​(org.springframework.http.HttpRequest request)
      Creates a methodTag for the method of the given request.
      static io.micrometer.core.instrument.Tagstatus​(org.springframework.http.client.ClientHttpResponse response)
      Creates a statusTag derived from the status of the given response.
      static io.micrometer.core.instrument.Taguri​(String uriTemplate)
      Creates a uriTag from the given uriTemplate.
      static io.micrometer.core.instrument.Taguri​(org.springframework.http.HttpRequest request)
      Creates a uriTag for the URI of the given request.
    • Method Detail

      • method

        public static io.micrometer.core.instrument.Tag method​(org.springframework.http.HttpRequest request)
        Creates a methodTag 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 uriTag 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 uriTag from the given uriTemplate.
        Parameters:
        uriTemplate - the template
        Returns:
        the uri tag
      • status

        public static io.micrometer.core.instrument.Tag status​(org.springframework.http.client.ClientHttpResponse response)
        Creates a statusTag 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 clientNameTag derived from the host of the URI of the given request.
        Parameters:
        request - the request
        Returns:
        the clientName tag