Skip to content
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

Merged
merged 4 commits into from
Oct 4, 2021

Conversation

iNikem
Copy link
Contributor

@iNikem iNikem commented Oct 3, 2021

No description provided.

iNikem and others added 2 commits October 4, 2021 08:28
…pentelemetry/javaagent/instrumentation/spymemcached/SpymemcachedAttributeExtractor.java

Co-authored-by: Trask Stalnaker <[email protected]>

protected CompletionListener(
Context parentContext, MemcachedConnection connection, String methodName) {
context = tracer().startSpan(parentContext, connection, methodName);
request = SpymemcachedRequest.create(connection, methodName);
Copy link
Member

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

Copy link
Contributor Author

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 🤔

@mateuszrzeszutek mateuszrzeszutek merged commit 11b2f16 into open-telemetry:main Oct 4, 2021
@mateuszrzeszutek
Copy link
Member

Oops, sorry, didn't mean to merge it -- I mistakenly clicked on the wrong PR 🙇

@iNikem
Copy link
Contributor Author

iNikem commented Oct 4, 2021

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 :)

@iNikem iNikem deleted the spymemcached branch October 4, 2021 12:13
@mateuszrzeszutek
Copy link
Member

Good thing it was only my comment 😂

@anuraaga
Copy link
Contributor

anuraaga commented Oct 4, 2021

LGTM :)

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.

4 participants