Skip to content

Conversation

dungdm93
Copy link
Contributor

Auto-configure lettuce tracing which available since lettuce 6.3

Signed-off-by: Đặng Minh Dũng <[email protected]>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 28, 2025
@wilkinsona
Copy link
Member

Thanks for the PR.

The proposed change relates to #46456 and may not be quite right as @mp911de proposed switching from MicrometerCommandLatencyRecorder to MicrometerTracing rather than adding the latter alongside the former. In #46456 (comment), I wanted to check if we'd lose anything by always making the switch when ObservationRegistry is on the classpath.

@mp911de, can you please advise?

@wilkinsona wilkinsona added the status: waiting-for-internal-feedback An issue that needs input from a member of another Spring Team label Aug 28, 2025
@mp911de
Copy link
Member

mp911de commented Aug 28, 2025

This PR doesn't remove MicrometerCommandLatencyRecorder (which in fact should be done to avoid duplicate metrics for the general case) as per #46456 (comment). Other than that, this is the appropriate change.

@dungdm93
Copy link
Contributor Author

@wilkinsona MicrometerCommandLatencyRecorder is for metrics, and MicrometerTracing is for tracing.

You can see more docs here

@mp911de
Copy link
Member

mp911de commented Aug 28, 2025

MicrometerTracing uses the Observation API that is provided by Micrometer to achieve both, metrics and spans.

@wilkinsona
Copy link
Member

Thanks, @mp911de.

@dungdm93, would you like to update your proposal accordingly? Instead of introducing a new LettuceTracingAutoConfiguration, the existing LettuceMetricsAutoConfiguration should be updated instead. It should be renamed to LettuceObservationAutoConfiguration and its content updated to match your proposed LettuceTracingAutoConfiguration.

@wilkinsona wilkinsona added status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-internal-feedback An issue that needs input from a member of another Spring Team labels Aug 29, 2025
@snicoll
Copy link
Member

snicoll commented Sep 15, 2025

@dungdm93 how is it going? Let us know if you have time to amend the PR as described above. Thanks!

@snicoll snicoll changed the title Autoconfigure redis tracing Configure Lettuce with MicrometerTracing instead of MicrometerCommandLatencyRecorder when micrometer-tracing is available Oct 3, 2025
@snicoll snicoll added type: enhancement A general enhancement and removed status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Oct 3, 2025
@snicoll snicoll self-assigned this Oct 3, 2025
@snicoll snicoll added this to the 4.0.0-RC1 milestone Oct 3, 2025
snicoll pushed a commit that referenced this pull request Oct 3, 2025
@snicoll snicoll closed this in 79ad5e6 Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants