public class LettuceObservationContext extends io.micrometer.observation.transport.SenderContext<Object>
Observation.Context holding Lettuce contextual details.| Constructor and Description |
|---|
LettuceObservationContext(String serviceName)
Create a new
LettuceObservationContext given the serviceName. |
| Modifier and Type | Method and Description |
|---|---|
RedisCommand<?,?,?> |
getRequiredCommand()
Returns the required
RedisCommand or throws IllegalStateException if no command is associated with the
context. |
Tracing.Endpoint |
getRequiredEndpoint()
Returns the required
Tracing.Endpoint or throws IllegalStateException if no endpoint is associated with the
context. |
boolean |
hasCommand() |
void |
setCommand(RedisCommand<?,?,?> command)
Set the
RedisCommand. |
void |
setEndpoint(Tracing.Endpoint endpoint)
Set the
Tracing.Endpoint. |
String |
toString() |
getCarrier, getKind, getRemoteServiceAddress, getRemoteServiceName, getSetter, setCarrier, setRemoteServiceAddress, setRemoteServiceNameaddHighCardinalityKeyValue, 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, setParentObservationpublic LettuceObservationContext(String serviceName)
LettuceObservationContext given the serviceName.serviceName - service name.public RedisCommand<?,?,?> getRequiredCommand()
RedisCommand or throws IllegalStateException if no command is associated with the
context. Use hasCommand() to check if the command is available.RedisCommand.IllegalStateException - if no command is associated with the context.public void setCommand(RedisCommand<?,?,?> command)
RedisCommand.command - the traced command.public boolean hasCommand()
true if the command is available;false otherwise.public Tracing.Endpoint getRequiredEndpoint()
Tracing.Endpoint or throws IllegalStateException if no endpoint is associated with the
context.Tracing.Endpoint.IllegalStateException - if no endpoint is associated with the context.public void setEndpoint(Tracing.Endpoint endpoint)
Tracing.Endpoint.endpoint - the traced endpoint.public String toString()
toString in class io.micrometer.observation.Observation.ContextCopyright © 2025 lettuce.io. All rights reserved.