Skip to content

Suggestions#12

Merged
steverao merged 2 commits intosteverao:convert-lettuce-to-use-instrumenterfrom
trask:fix-lettuce-instrumenter
Feb 15, 2026
Merged

Suggestions#12
steverao merged 2 commits intosteverao:convert-lettuce-to-use-instrumenterfrom
trask:fix-lettuce-instrumenter

Conversation

@trask
Copy link
Copy Markdown

@trask trask commented Feb 14, 2026

No description provided.

DbClientAttributesGetter extends ServerAttributesGetter, so
DbClientAttributesExtractor already handles server attributes internally.
Remove the separate LettuceServerAttributesGetter and ServerAttributesExtractor
to match the canonical pattern used by other DB instrumentations (Jedis, etc.).
Null out context after instrumenter.end() to guard against both the
onComplete callback and Lettuce's direct finish() call executing.
Add comment explaining error lifecycle when start() was not called.
public synchronized void finish() {
if (context != null) {
instrumenter.end(context, request, response, error);
// Null out context to prevent double-ending if both the onComplete callback and Lettuce's
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@steverao steverao merged commit e1ee14e into steverao:convert-lettuce-to-use-instrumenter Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants