java.lang.Object
org.springframework.boot.actuate.metrics.web.reactive.client.WebClientExchangeTags

public final class WebClientExchangeTags extends Object
Factory methods for creating Tags related to a request-response exchange performed by a WebClient.
Since:
2.1.0
Author:
Brian Clozel, Nishant Raut
  • Method Details

    • method

      public static io.micrometer.core.instrument.Tag method(ClientRequest 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(ClientRequest request)
      Creates a uri Tag for the URI path of the given request.
      Parameters:
      request - the request
      Returns:
      the uri tag
    • status

      public static io.micrometer.core.instrument.Tag status(ClientResponse response, Throwable throwable)
      Creates a status Tag derived from the ClientResponse.statusCode() of the given response if available, the thrown exception otherwise, or considers the request as Cancelled as a last resort.
      Parameters:
      response - the response
      throwable - the exception
      Returns:
      the status tag
      Since:
      2.3.0
    • clientName

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

      public static io.micrometer.core.instrument.Tag outcome(ClientResponse 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