Skip to content

Rework spymemcached server attribute handling#11

Merged
steverao merged 1 commit intosteverao:spymemcachedfrom
laurit:spymemcached-server-address
Feb 17, 2026
Merged

Rework spymemcached server attribute handling#11
steverao merged 1 commit intosteverao:spymemcachedfrom
laurit:spymemcached-server-address

Conversation

@laurit
Copy link
Copy Markdown

@laurit laurit commented Feb 13, 2026

No description provided.

return callDepth;
public static AdviceScope<OperationFuture<?>, OperationCompletionListener> methodEnter(
@Advice.This MemcachedClient client, @Advice.Origin("#m") String methodName) {
return AdviceScope.start(AsyncOperationHandler.INSTANCE, client, methodName);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

start span at the start of the method as we do in other instrumetnations

: null),
equalTo(maybeStable(DB_SYSTEM), MEMCACHED),
equalTo(maybeStable(DB_OPERATION), "decr"),
equalTo(SERVER_ADDRESS, memcachedContainer.getHost()),
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Since the exception is thrown before the request is sent to the server we can't fill the server attributes (unless theres is only 1 node). Without this PR the exception tests fail when they are run without other tests so the address probably leaked over from a previous test.

@steverao steverao merged commit 9346bc7 into steverao:spymemcached Feb 17, 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