Class ClientRequestObservationContext
java.lang.Object
io.micrometer.observation.Observation.Context
io.micrometer.observation.transport.SenderContext<ClientRequest.Builder>
io.micrometer.observation.transport.RequestReplySenderContext<ClientRequest.Builder, ClientResponse>
org.springframework.web.reactive.function.client.ClientRequestObservationContext
- All Implemented Interfaces:
- io.micrometer.observation.Observation.ContextView, io.micrometer.observation.transport.ResponseContext<ClientResponse>
public class ClientRequestObservationContext
extends io.micrometer.observation.transport.RequestReplySenderContext<ClientRequest.Builder, ClientResponse>
Context that holds information for metadata collection during the
HTTP client exchange observations.
The tracing context carrier is a request builder,
since the actual request is immutable. For KeyValue extraction,
the actual request should be used instead.
- Since:
- 6.0
- Author:
- Brian Clozel
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a new Observation context for HTTP client observations.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the immutable client request.Return the URI template used for the current client exchange,nullif none was used.booleanWhether the client aborted the current HTTP exchange before receiving any response.voidsetRequest(ClientRequest request) Set the client request.voidsetUriTemplate(@Nullable String uriTemplate) Set the URI template used for the current client exchange.Methods inherited from class io.micrometer.observation.transport.RequestReplySenderContextgetResponse, setResponseMethods inherited from class io.micrometer.observation.transport.SenderContextgetCarrier, getKind, getRemoteServiceAddress, getRemoteServiceName, getSetter, setCarrier, setRemoteServiceAddress, setRemoteServiceNameMethods inherited from class io.micrometer.observation.Observation.ContextaddHighCardinalityKeyValue, addHighCardinalityKeyValues, addLowCardinalityKeyValue, addLowCardinalityKeyValues, clear, computeIfAbsent, containsKey, get, getAllKeyValues, getContextualName, getError, getHighCardinalityKeyValue, getHighCardinalityKeyValues, getLowCardinalityKeyValue, getLowCardinalityKeyValues, getName, getOrDefault, getParentObservation, getRequired, put, remove, removeHighCardinalityKeyValue, removeHighCardinalityKeyValues, removeLowCardinalityKeyValue, removeLowCardinalityKeyValues, setContextualName, setError, setName, setParentObservation, toStringMethods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micrometer.observation.Observation.ContextViewgetOrDefault
- 
Constructor Details- 
ClientRequestObservationContextCreate a new Observation context for HTTP client observations.- Parameters:
- request- client request builder
- Since:
- 6.1.2
 
 
- 
- 
Method Details- 
setUriTemplate
- 
getUriTemplate
- 
isAbortedpublic boolean isAborted()Whether the client aborted the current HTTP exchange before receiving any response.- Returns:
- whether the exchange has been aborted
 
- 
setRequestSet the client request.
- 
getRequestReturn the immutable client request.
 
-