Class SenderContext<C>
java.lang.Object
io.micrometer.observation.Observation.Context
io.micrometer.observation.transport.SenderContext<C>
- Type Parameters:
C- type of the carrier object
- All Implemented Interfaces:
Observation.ContextView
- Direct Known Subclasses:
RequestReplySenderContext
Context used when sending data over the wire in a fire and forget fashion.
- Since:
- 1.10.0
-
Constructor Summary
ConstructorsConstructorDescriptionSenderContext(Propagator.Setter<C> setter) Creates a new instance of aKind.PRODUCERSenderContext.SenderContext(Propagator.Setter<C> setter, Kind kind) Creates a new instance ofSenderContext. -
Method Summary
Modifier and TypeMethodDescription@Nullable CgetKind()@Nullable StringReturn optional address for the service that will be called.@Nullable StringReturn optional name for the service that will be called.voidsetCarrier(C carrier) voidsetRemoteServiceAddress(@Nullable String remoteServiceAddress) Set optional service address for the service that will be called.voidsetRemoteServiceName(@Nullable String remoteServiceName) Set optional name for the service that will be called.Methods 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
-
SenderContext
Creates a new instance ofSenderContext.- Parameters:
setter- propagator setterkind- kind
-
SenderContext
Creates a new instance of aKind.PRODUCERSenderContext.- Parameters:
setter- propagator setter
-
-
Method Details
-
getCarrier
-
setCarrier
-
getSetter
-
getKind
-
getRemoteServiceName
Return optional name for the service that will be called.- Returns:
- optional name for the service that will be called
-
setRemoteServiceName
Set optional name for the service that will be called.- Parameters:
remoteServiceName- name of the service that will be called
-
getRemoteServiceAddress
Return optional address for the service that will be called.- Returns:
- optional address for the service that will be called
-
setRemoteServiceAddress
Set optional service address for the service that will be called.- Parameters:
remoteServiceAddress- service address for the service that will be called
-