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.Span s 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, wait
clearContext, disabled, getContext, withTraceContextProvider
public 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 Tracing
TracerProvider
.public TraceContextProvider initialTraceContextProvider()
initialTraceContextProvider
in interface Tracing
TraceContextProvider
supplying the initial TraceContext
(i.e. if there is no active span).public boolean isEnabled()
Tracing
true
if tracing is enabled.public boolean includeCommandArgsInSpanTags()
Tracing
true
if tags for Tracer.Span
s should include the command arguments.includeCommandArgsInSpanTags
in interface Tracing
true
if tags for Tracer.Span
s should include the command arguments.public Tracing.Endpoint createEndpoint(SocketAddress socketAddress)
Tracing
Tracing.Endpoint
given SocketAddress
.createEndpoint
in interface Tracing
socketAddress
- the remote address.Tracing.Endpoint
for SocketAddress
.Copyright © 2023 lettuce.io. All rights reserved.