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 TypeMethodDescriptiongetKind()Return optional address for the service that will be called.Return optional name for the service that will be called.voidsetCarrier(C carrier) voidsetRemoteServiceAddress(String remoteServiceAddress) Set optional service address for the service that will be called.voidsetRemoteServiceName(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, toString
-
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
-