public class MicrometerTracing extends Object implements Tracing
Tracing adapter using Micrometer's Observation. This adapter integrates with Micrometer to propagate
observations into timers, distributed traces and any other registered handlers. Observations include a set of tags capturing
Redis runtime information.
includeCommandArgsInSpanTags. You should carefully consider the impact of this setting as all command arguments will
be captured in traces including these that may contain sensitive details.Tracing.Endpoint| Constructor and Description |
|---|
MicrometerTracing(io.micrometer.observation.ObservationRegistry observationRegistry,
String serviceName)
Create a new
MicrometerTracing instance. |
MicrometerTracing(io.micrometer.observation.ObservationRegistry observationRegistry,
String serviceName,
boolean includeCommandArgsInSpanTags)
Create a new
MicrometerTracing instance. |
MicrometerTracing(io.micrometer.observation.ObservationRegistry observationRegistry,
String serviceName,
LettuceObservationConvention convention)
Create a new
MicrometerTracing instance. |
| Modifier and Type | Method and Description |
|---|---|
Tracing.Endpoint |
createEndpoint(SocketAddress socketAddress)
Create an
Tracing.Endpoint given SocketAddress. |
TracerProvider |
getTracerProvider() |
boolean |
includeCommandArgsInSpanTags()
Returns
true if tags for Tracer.Spans should include the command arguments. |
TraceContextProvider |
initialTraceContextProvider() |
boolean |
isEnabled()
Returns
true if tracing is enabled. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearContext, disabled, getContext, withTraceContextProviderpublic MicrometerTracing(io.micrometer.observation.ObservationRegistry observationRegistry,
String serviceName)
MicrometerTracing instance.observationRegistry - must not be null.serviceName - service name to be used.public MicrometerTracing(io.micrometer.observation.ObservationRegistry observationRegistry,
String serviceName,
boolean includeCommandArgsInSpanTags)
MicrometerTracing instance.observationRegistry - must not be null.serviceName - service name to be used.includeCommandArgsInSpanTags - whether to attach the full command into the trace. Use this flag with caution as
sensitive arguments will be captured in the observation spans and metric tags.public MicrometerTracing(io.micrometer.observation.ObservationRegistry observationRegistry,
String serviceName,
LettuceObservationConvention convention)
MicrometerTracing instance.observationRegistry - must not be null.serviceName - service name to be used.convention - the observation convention to usepublic TracerProvider getTracerProvider()
getTracerProvider in interface TracingTracerProvider.public TraceContextProvider initialTraceContextProvider()
initialTraceContextProvider in interface TracingTraceContextProvider supplying the initial TraceContext (i.e. if there is no active span).public boolean isEnabled()
Tracingtrue if tracing is enabled.public boolean includeCommandArgsInSpanTags()
Tracingtrue if tags for Tracer.Spans should include the command arguments.includeCommandArgsInSpanTags in interface Tracingtrue if tags for Tracer.Spans should include the command arguments.public Tracing.Endpoint createEndpoint(SocketAddress socketAddress)
TracingTracing.Endpoint given SocketAddress.createEndpoint in interface TracingsocketAddress - the remote address.Tracing.Endpoint for SocketAddress.Copyright © 2025 lettuce.io. All rights reserved.