-
Notifications
You must be signed in to change notification settings - Fork 857
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
Disable Elasticsearch instrumentation for ES clients 8.10+ #9337
Conversation
…ome with native OTel instrumentation. Signed-off-by: Alexander Wert <[email protected]>
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.
Nice! 👍
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.
What do you think of adding a latestDepTestLibrary
dependency in order to limit the version we test against to 8.9.+
?
(it's surprising the our tests appear to pass against 8.10+ with the native instrumentation, but guessing they may stop passing at some point as you enhance the native instrumentation)
instrumentation/elasticsearch/elasticsearch-api-client-7.16/javaagent/build.gradle.kts
Outdated
Show resolved
Hide resolved
instrumentation/elasticsearch/elasticsearch-rest-7.0/javaagent/build.gradle.kts
Outdated
Show resolved
Hide resolved
Yes, need to adapt tests and add a test for 8.10+ versions ensuring those provide telemetry and the instrumentation being disabled. 8.10 is not released yet, I guess that's why the tests still pass. We can wait with merging this PR until 8.10 is released and I can add the tests then. |
ah, I missed that, thx
👍
let's decide first whether we want to add tests in this repo for native instrumentation, I'll add this topic to the Java SIG agenda this week |
@AlexanderWert we discussed this, but in the end I think want to leave it up to you in this particular case, check out the discussion starting at 47:15 in this recording: https://zoom.us/rec/share/L_HeZkVwtNsb_7Tjhr5-yBKACDtxcMJ-K4ug3MXq0YrW-F_XtP63iqbrhtePgAAt.bwuP1Me0aulyGMGV |
@trask @mateuszrzeszutek @laurit (and others involved) Thank you for the great discussion in the Java SIG.
--> I think starting with a How-To / recommendations guide or blog post for library vendors on native instrumentation would be a great starting point. Happy to get this started, if you agree.
|
We briefly mentioned it here, but that's probably all. I 100% agree that the current documentation is hardly sufficient. |
I think an OpenTelemetry blog post would be great highlighting the new elasticsearch native instrumentation would be great! I think many projects are waiting to see others' experiences before wading into these waters themselves. |
Co-authored-by: Trask Stalnaker <[email protected]>
@laurit I think with the last commit (1c5fb6e) we will end up with duplicate instrumentation when using the native ES client instrumentation. You're right that the REST client does not have a native instrumentation. BUT, the ES API client has a native instrumentation on the transport level and uses the Rest client underneath. Not disabling the REST client instrumentation will produce duplicate spans. I'm proposing to revert that last commit. |
@AlexanderWert it was reverted because build did not pass with it https://github.com/open-telemetry/opentelemetry-java-instrumentation/actions/runs/6163034122/job/16725786333 |
@laurit yeah, this is a tricky case, since the instrumentation affects two independent libraries. What do you think about keeping the muzzle definition with
BUT, keep the
with that, the build should pass since the muzzle check is being executed in isolation for the REST client, but when the native instrumentation is in place the rest client instrumentation would be disabled. |
The Elasticsearch client introduces native, on-by-default OTel instrumentation in version 8.10.
Therefore, the agent-based instrumentation should be disabled for those versions of the Elasticsearch client.