diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/observability/DefaultLettuceObservationConvention.java b/src/main/java/org/springframework/data/redis/connection/lettuce/observability/DefaultLettuceObservationConvention.java index fa662181f5..7d400eb9ba 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/observability/DefaultLettuceObservationConvention.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/observability/DefaultLettuceObservationConvention.java @@ -15,22 +15,25 @@ */ package org.springframework.data.redis.connection.lettuce.observability; +import io.lettuce.core.protocol.RedisCommand; +import io.lettuce.core.tracing.Tracing.Endpoint; +import io.micrometer.common.KeyValues; + import java.net.InetSocketAddress; import java.util.Locale; import org.springframework.data.redis.connection.lettuce.observability.RedisObservation.HighCardinalityCommandKeyNames; import org.springframework.data.redis.connection.lettuce.observability.RedisObservation.LowCardinalityCommandKeyNames; -import io.lettuce.core.protocol.RedisCommand; -import io.lettuce.core.tracing.Tracing.Endpoint; -import io.micrometer.common.KeyValues; - /** * Default {@link LettuceObservationConvention} implementation. * * @author Mark Paluch * @since 3.0 + * @deprecated since 3.4 for removal with the next major revision. Use Lettuce's Micrometer integration through + * {@link io.lettuce.core.tracing.MicrometerTracing}. */ +@Deprecated(since = "3.4", forRemoval = true) record DefaultLettuceObservationConvention( boolean includeCommandArgsInSpanTags) implements LettuceObservationConvention { @@ -43,7 +46,7 @@ public KeyValues getLowCardinalityKeyValues(LettuceObservationContext context) { if (ep instanceof SocketAddressEndpoint endpoint) { - if (endpoint.socketAddress()instanceof InetSocketAddress inet) { + if (endpoint.socketAddress() instanceof InetSocketAddress inet) { keyValues = keyValues .and(KeyValues.of(LowCardinalityCommandKeyNames.NET_SOCK_PEER_ADDR.withValue(inet.getHostString()), LowCardinalityCommandKeyNames.NET_SOCK_PEER_PORT.withValue("" + inet.getPort()), diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/observability/LettuceObservationContext.java b/src/main/java/org/springframework/data/redis/connection/lettuce/observability/LettuceObservationContext.java index e1a77d3e7b..0acb956297 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/observability/LettuceObservationContext.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/observability/LettuceObservationContext.java @@ -28,7 +28,10 @@ * * @author Mark Paluch * @since 3.0 + * @deprecated since 3.4 for removal with the next major revision. Use Lettuce's Micrometer integration through + * {@link io.lettuce.core.tracing.MicrometerTracing}. */ +@Deprecated(since = "3.4", forRemoval = true) public class LettuceObservationContext extends SenderContext { private volatile @Nullable RedisCommand command; diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/observability/LettuceObservationConvention.java b/src/main/java/org/springframework/data/redis/connection/lettuce/observability/LettuceObservationConvention.java index 92c1e0ee0a..55a9316c14 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/observability/LettuceObservationConvention.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/observability/LettuceObservationConvention.java @@ -23,7 +23,10 @@ * * @author Mark Paluch * @since 3.0 + * @deprecated since 3.4 for removal with the next major revision. Use Lettuce's Micrometer integration through + * {@link io.lettuce.core.tracing.MicrometerTracing}. */ +@Deprecated(since = "3.4", forRemoval = true) interface LettuceObservationConvention extends ObservationConvention { @Override diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/observability/MicrometerTracingAdapter.java b/src/main/java/org/springframework/data/redis/connection/lettuce/observability/MicrometerTracingAdapter.java index 010c5eb155..21c28a41ee 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/observability/MicrometerTracingAdapter.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/observability/MicrometerTracingAdapter.java @@ -46,7 +46,10 @@ * @author Mark Paluch * @author Yanming Zhou * @since 3.0 + * @deprecated since 3.4 for removal with the next major revision. Use Lettuce's Micrometer integration through + * {@link io.lettuce.core.tracing.MicrometerTracing}. */ +@Deprecated(since = "3.4", forRemoval = true) public class MicrometerTracingAdapter implements Tracing { private static final Log log = LogFactory.getLog(MicrometerTracingAdapter.class); diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/observability/RedisObservation.java b/src/main/java/org/springframework/data/redis/connection/lettuce/observability/RedisObservation.java index fb57b0fd82..6654be9bd1 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/observability/RedisObservation.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/observability/RedisObservation.java @@ -23,7 +23,10 @@ * * @author Mark Paluch * @since 3.0 + * @deprecated since 3.4 for removal with the next major revision. Use Lettuce's Micrometer integration through + * {@link io.lettuce.core.tracing.MicrometerTracing}. */ +@Deprecated(since = "3.4", forRemoval = true) public enum RedisObservation implements ObservationDocumentation { /** diff --git a/src/main/java/org/springframework/data/redis/connection/lettuce/observability/SocketAddressEndpoint.java b/src/main/java/org/springframework/data/redis/connection/lettuce/observability/SocketAddressEndpoint.java index ecc6b26fe1..f2c311266d 100644 --- a/src/main/java/org/springframework/data/redis/connection/lettuce/observability/SocketAddressEndpoint.java +++ b/src/main/java/org/springframework/data/redis/connection/lettuce/observability/SocketAddressEndpoint.java @@ -15,14 +15,17 @@ */ package org.springframework.data.redis.connection.lettuce.observability; +import io.lettuce.core.tracing.Tracing.Endpoint; + import java.net.InetSocketAddress; import java.net.SocketAddress; -import io.lettuce.core.tracing.Tracing.Endpoint; - /** * @author Mark Paluch + * @deprecated since 3.4 for removal with the next major revision. Use Lettuce's Micrometer integration through + * {@link io.lettuce.core.tracing.MicrometerTracing}. */ +@Deprecated(since = "3.4", forRemoval = true) record SocketAddressEndpoint(SocketAddress socketAddress) implements Endpoint { @Override