Class ClientObservationContext

java.lang.Object
io.micrometer.observation.Observation.Context
io.micrometer.observation.transport.SenderContext<C>
io.micrometer.observation.transport.RequestReplySenderContext<ClientRequest,ClientResponse>
org.springframework.web.reactive.function.client.ClientObservationContext
All Implemented Interfaces:
io.micrometer.observation.Observation.ContextView, io.micrometer.observation.transport.ResponseContext<ClientResponse>

public class ClientObservationContext extends io.micrometer.observation.transport.RequestReplySenderContext<ClientRequest,ClientResponse>
Context that holds information for metadata collection during the HTTP client observations.
Since:
6.0
Author:
Brian Clozel
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the URI template used for the current client exchange, null if none was used.
    boolean
    Whether the client aborted the current HTTP exchange before receiving any response.
    void
    setUriTemplate(String uriTemplate)
    Set the URI template used for the current client exchange.

    Methods inherited from class io.micrometer.observation.transport.RequestReplySenderContext

    getResponse, setResponse

    Methods inherited from class io.micrometer.observation.transport.SenderContext

    getCarrier, getKind, getRemoteServiceName, getSetter, setCarrier, setRemoteServiceName

    Methods inherited from class io.micrometer.observation.Observation.Context

    addHighCardinalityKeyValue, addHighCardinalityKeyValues, addLowCardinalityKeyValue, addLowCardinalityKeyValues, clear, computeIfAbsent, containsKey, get, getAllKeyValues, getContextualName, getError, getHighCardinalityKeyValues, getLowCardinalityKeyValues, getName, getOrDefault, getParentObservation, getRequired, put, remove, setContextualName, setError, setName, setParentObservation, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ClientObservationContext

      public ClientObservationContext()
  • Method Details

    • getUriTemplate

      @Nullable public String getUriTemplate()
      Return the URI template used for the current client exchange, null if none was used.
    • setUriTemplate

      public void setUriTemplate(@Nullable String uriTemplate)
      Set the URI template used for the current client exchange.
    • isAborted

      public boolean isAborted()
      Whether the client aborted the current HTTP exchange before receiving any response.
      Returns:
      whether the exchange has been aborted