Skip to content

Commit f97b682

Browse files
committed
Remove MicrometerTracingAdapter in favor of Lettuce's Micrometer support.
Closes #3093
1 parent 2cf57db commit f97b682

File tree

11 files changed

+5
-1081
lines changed

11 files changed

+5
-1081
lines changed

src/main/antora/modules/ROOT/pages/observability.adoc

+5-75
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
= Observability
33

44
Getting insights from an application component about its operations, timing and relation to application code is crucial to understand latency.
5-
Spring Data Redis ships with a Micrometer integration through the Lettuce driver to collect observations during Redis interaction.
5+
Lettuce ships with a Micrometer integration to collect observations during Redis interaction.
66
Once the integration is set up, Micrometer will create meters and spans (for distributed tracing) for each Redis command.
77

88
To enable the integration, apply the following configuration to `LettuceClientConfiguration`:
@@ -16,7 +16,7 @@ class ObservabilityConfiguration {
1616
public ClientResources clientResources(ObservationRegistry observationRegistry) {
1717
1818
return ClientResources.builder()
19-
.tracing(new MicrometerTracingAdapter(observationRegistry, "my-redis-cache"))
19+
.tracing(new MicrometerTracing(observationRegistry, "my-redis-cache"))
2020
.build();
2121
}
2222
@@ -31,77 +31,7 @@ class ObservabilityConfiguration {
3131
}
3232
----
3333

34-
See also https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/database/#redis[OpenTelemetry Semantic Conventions] for further reference.
34+
See also for further reference:
35+
* https://redis.github.io/lettuce/advanced-usage/#micrometer[Lettuce Tracing]
36+
* https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/database/#redis[OpenTelemetry Semantic Conventions] .
3537

36-
[[observability-metrics]]
37-
== Observability - Metrics
38-
39-
Below you can find a list of all metrics declared by this project.
40-
41-
[[observability-metrics-redis-command-observation]]
42-
== Redis Command Observation
43-
44-
____
45-
Timer created around a Redis command execution.
46-
____
47-
48-
**Metric name** `spring.data.redis`. **Type** `timer` and **base unit** `seconds`.
49-
50-
Fully qualified name of the enclosing class `org.springframework.data.redis.connection.lettuce.observability.RedisObservation`.
51-
52-
53-
54-
.Low cardinality Keys
55-
[cols="a,a"]
56-
|===
57-
|Name | Description
58-
|`db.operation`|Redis command value.
59-
|`db.redis.database_index`|Redis database index.
60-
|`db.system`|Database system.
61-
|`db.user`|Redis user.
62-
|`net.peer.name`|Name of the database host.
63-
|`net.peer.port`|Logical remote port number.
64-
|`net.sock.peer.addr`|Mongo peer address.
65-
|`net.sock.peer.port`|Mongo peer port.
66-
|`net.transport`|Network transport.
67-
|===
68-
69-
.High cardinality Keys
70-
[cols="a,a"]
71-
|===
72-
|Name | Description
73-
|`db.statement`|Redis statement.
74-
|`spring.data.redis.command.error`|Redis error response.
75-
|===
76-
77-
[[observability-spans]]
78-
== Observability - Spans
79-
80-
Below you can find a list of all spans declared by this project.
81-
82-
[[observability-spans-redis-command-observation]]
83-
== Redis Command Observation Span
84-
85-
> Timer created around a Redis command execution.
86-
87-
**Span name** `spring.data.redis`.
88-
89-
Fully qualified name of the enclosing class `org.springframework.data.redis.connection.lettuce.observability.RedisObservation`.
90-
91-
92-
93-
.Tag Keys
94-
|===
95-
|Name | Description
96-
|`db.operation`|Redis command value.
97-
|`db.redis.database_index`|Redis database index.
98-
|`db.statement`|Redis statement.
99-
|`db.system`|Database system.
100-
|`db.user`|Redis user.
101-
|`net.peer.name`|Name of the database host.
102-
|`net.peer.port`|Logical remote port number.
103-
|`net.sock.peer.addr`|Mongo peer address.
104-
|`net.sock.peer.port`|Mongo peer port.
105-
|`net.transport`|Network transport.
106-
|`spring.data.redis.command.error`|Redis error response.
107-
|===

src/main/java/org/springframework/data/redis/connection/lettuce/observability/DefaultLettuceObservationConvention.java

-84
This file was deleted.

src/main/java/org/springframework/data/redis/connection/lettuce/observability/LettuceObservationContext.java

-75
This file was deleted.

src/main/java/org/springframework/data/redis/connection/lettuce/observability/LettuceObservationConvention.java

-37
This file was deleted.

0 commit comments

Comments
 (0)