Skip to content

Commit

Permalink
Remove MicrometerTracingAdapter in favor of Lettuce's Micrometer su…
Browse files Browse the repository at this point in the history
…pport.

Closes #3093
  • Loading branch information
mp911de committed Jan 16, 2025
1 parent 2cf57db commit f97b682
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 1,081 deletions.
80 changes: 5 additions & 75 deletions src/main/antora/modules/ROOT/pages/observability.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
= Observability

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

To enable the integration, apply the following configuration to `LettuceClientConfiguration`:
Expand All @@ -16,7 +16,7 @@ class ObservabilityConfiguration {
public ClientResources clientResources(ObservationRegistry observationRegistry) {
return ClientResources.builder()
.tracing(new MicrometerTracingAdapter(observationRegistry, "my-redis-cache"))
.tracing(new MicrometerTracing(observationRegistry, "my-redis-cache"))
.build();
}
Expand All @@ -31,77 +31,7 @@ class ObservabilityConfiguration {
}
----

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

[[observability-metrics]]
== Observability - Metrics

Below you can find a list of all metrics declared by this project.

[[observability-metrics-redis-command-observation]]
== Redis Command Observation

____
Timer created around a Redis command execution.
____

**Metric name** `spring.data.redis`. **Type** `timer` and **base unit** `seconds`.

Fully qualified name of the enclosing class `org.springframework.data.redis.connection.lettuce.observability.RedisObservation`.



.Low cardinality Keys
[cols="a,a"]
|===
|Name | Description
|`db.operation`|Redis command value.
|`db.redis.database_index`|Redis database index.
|`db.system`|Database system.
|`db.user`|Redis user.
|`net.peer.name`|Name of the database host.
|`net.peer.port`|Logical remote port number.
|`net.sock.peer.addr`|Mongo peer address.
|`net.sock.peer.port`|Mongo peer port.
|`net.transport`|Network transport.
|===

.High cardinality Keys
[cols="a,a"]
|===
|Name | Description
|`db.statement`|Redis statement.
|`spring.data.redis.command.error`|Redis error response.
|===

[[observability-spans]]
== Observability - Spans

Below you can find a list of all spans declared by this project.

[[observability-spans-redis-command-observation]]
== Redis Command Observation Span

> Timer created around a Redis command execution.

**Span name** `spring.data.redis`.

Fully qualified name of the enclosing class `org.springframework.data.redis.connection.lettuce.observability.RedisObservation`.



.Tag Keys
|===
|Name | Description
|`db.operation`|Redis command value.
|`db.redis.database_index`|Redis database index.
|`db.statement`|Redis statement.
|`db.system`|Database system.
|`db.user`|Redis user.
|`net.peer.name`|Name of the database host.
|`net.peer.port`|Logical remote port number.
|`net.sock.peer.addr`|Mongo peer address.
|`net.sock.peer.port`|Mongo peer port.
|`net.transport`|Network transport.
|`spring.data.redis.command.error`|Redis error response.
|===

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f97b682

Please sign in to comment.