Class ClientRequestObservationContext
java.lang.Object
io.micrometer.observation.Observation.Context
io.micrometer.observation.transport.SenderContext<C>
io.micrometer.observation.transport.RequestReplySenderContext<ClientHttpRequest,ClientHttpResponse>
org.springframework.http.client.observation.ClientRequestObservationContext
- All Implemented Interfaces:
io.micrometer.observation.Observation.ContextView,io.micrometer.observation.transport.ResponseContext<ClientHttpResponse>
public class ClientRequestObservationContext
extends io.micrometer.observation.transport.RequestReplySenderContext<ClientHttpRequest,ClientHttpResponse>
Context that holds information for metadata collection during the
client HTTP exchanges observations.
This context also extends RequestReplySenderContext for propagating tracing
information with the HTTP client exchange.
- Since:
- 6.0
- Author:
- Brian Clozel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the URI template used for the current client exchange,nullif none was used.voidsetUriTemplate(String uriTemplate) Set the URI template used for the current client exchange.Methods inherited from class io.micrometer.observation.transport.RequestReplySenderContext
getResponse, setResponseMethods inherited from class io.micrometer.observation.transport.SenderContext
getCarrier, getKind, getRemoteServiceAddress, getRemoteServiceName, getSetter, setCarrier, setRemoteServiceAddress, setRemoteServiceNameMethods inherited from class io.micrometer.observation.Observation.Context
addHighCardinalityKeyValue, 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micrometer.observation.Observation.ContextView
getOrDefault
-
Constructor Details
-
ClientRequestObservationContext
Create an observation context forClientHttpRequestobservations.- Parameters:
request- the HTTP client request
-
-
Method Details
-
setUriTemplate
Set the URI template used for the current client exchange. -
getUriTemplate
Return the URI template used for the current client exchange,nullif none was used.
-