-
Notifications
You must be signed in to change notification settings - Fork 881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert Spymemcached integration to Instrumenter #4273
Conversation
.../io/opentelemetry/javaagent/instrumentation/spymemcached/SpymemcachedAttributeExtractor.java
Outdated
Show resolved
Hide resolved
…pentelemetry/javaagent/instrumentation/spymemcached/SpymemcachedAttributeExtractor.java Co-authored-by: Trask Stalnaker <[email protected]>
...c/main/java/io/opentelemetry/javaagent/instrumentation/spymemcached/SpymemcachedRequest.java
Outdated
Show resolved
Hide resolved
|
||
protected CompletionListener( | ||
Context parentContext, MemcachedConnection connection, String methodName) { | ||
context = tracer().startSpan(parentContext, connection, methodName); | ||
request = SpymemcachedRequest.create(connection, methodName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we refactor this instrumentation to insert shouldStart()
somewhere? E.g. not register the listener at all if shouldStart()
returns false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still have to create SpymemcachedRequest
for shouldStart
. Plus we have CallDepth
check before creating listener. I don't think we are going to have any performance gain from this 🤔
Oops, sorry, didn't mean to merge it -- I mistakenly clicked on the wrong PR 🙇 |
:D Well, as a punishment you now have to create a separate issue for any follow-ups left unresolved in this PR :) |
Good thing it was only my comment 😂 |
LGTM :) |
No description provided.