Class MicrometerTracingAdapter

java.lang.Object
org.springframework.data.redis.connection.lettuce.observability.MicrometerTracingAdapter
All Implemented Interfaces:
io.lettuce.core.tracing.Tracing

@Deprecated(since="3.4", forRemoval=true) public class MicrometerTracingAdapter extends Object implements io.lettuce.core.tracing.Tracing
Deprecated, for removal: This API element is subject to removal in a future version.
since 3.4 for removal with the next major revision. Use Lettuce's Micrometer integration through MicrometerTracing.
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.

Capturing full statements

This adapter can capture full statements when enabling 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.
Since:
3.0
Author:
Mark Paluch, Yanming Zhou
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
    Deprecated, for removal: This API element is subject to removal in a future version.
    Tracer implementation based on Micrometer's ObservationRegistry.

    Nested classes/interfaces inherited from interface io.lettuce.core.tracing.Tracing

    io.lettuce.core.tracing.Tracing.Endpoint
  • Constructor Summary

    Constructors
    Constructor
    Description
    MicrometerTracingAdapter(io.micrometer.observation.ObservationRegistry observationRegistry, String serviceName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a new MicrometerTracingAdapter instance.
    MicrometerTracingAdapter(io.micrometer.observation.ObservationRegistry observationRegistry, String serviceName, boolean includeCommandArgsInSpanTags)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a new MicrometerTracingAdapter instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.lettuce.core.tracing.Tracing.Endpoint
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    io.lettuce.core.tracing.TracerProvider
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    io.lettuce.core.tracing.TraceContextProvider
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MicrometerTracingAdapter

      public MicrometerTracingAdapter(io.micrometer.observation.ObservationRegistry observationRegistry, String serviceName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new MicrometerTracingAdapter instance.
      Parameters:
      observationRegistry - must not be null.
      serviceName - service name to be used.
    • MicrometerTracingAdapter

      public MicrometerTracingAdapter(io.micrometer.observation.ObservationRegistry observationRegistry, String serviceName, boolean includeCommandArgsInSpanTags)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new MicrometerTracingAdapter instance.
      Parameters:
      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.
  • Method Details

    • getTracerProvider

      public io.lettuce.core.tracing.TracerProvider getTracerProvider()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getTracerProvider in interface io.lettuce.core.tracing.Tracing
    • initialTraceContextProvider

      public io.lettuce.core.tracing.TraceContextProvider initialTraceContextProvider()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      initialTraceContextProvider in interface io.lettuce.core.tracing.Tracing
    • isEnabled

      public boolean isEnabled()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      isEnabled in interface io.lettuce.core.tracing.Tracing
    • includeCommandArgsInSpanTags

      public boolean includeCommandArgsInSpanTags()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      includeCommandArgsInSpanTags in interface io.lettuce.core.tracing.Tracing
    • createEndpoint

      public io.lettuce.core.tracing.Tracing.Endpoint createEndpoint(SocketAddress socketAddress)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      createEndpoint in interface io.lettuce.core.tracing.Tracing