-
Notifications
You must be signed in to change notification settings - Fork 324
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
Added ES client 8.x instrumentation #3157
Conversation
Signed-off-by: Alexander Wert <[email protected]>
Signed-off-by: Alexander Wert <[email protected]>
.../src/main/java/co/elastic/apm/agent/esapiclient/v8_x/RestClientTransportInstrumentation.java
Outdated
Show resolved
Hide resolved
apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-8_x/pom.xml
Outdated
Show resolved
Hide resolved
private EndpointResolutionHelper() { | ||
// This map is generated from the Java client code. | ||
// It's a one-time generation that shouldn't require maintenance effort, | ||
// as in the future the ES client will come with a native instrumentation. |
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.
Will there be a way for us to detect that the used ES client already comes with OTel instrumentation? So that we can disable our own ES-client instrumentation? E.g. a newly added class for whose presence we can test would be perfect.
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.
Added issue as follow up task, because the native ES client is not merged yet:
#3235
...-plugin-common/src/main/java/co/elastic/apm/agent/esrestclient/EndpointResolutionHelper.java
Outdated
Show resolved
Hide resolved
...-plugin-common/src/main/java/co/elastic/apm/agent/esrestclient/EndpointResolutionHelper.java
Outdated
Show resolved
Hide resolved
...-plugin-common/src/main/java/co/elastic/apm/agent/esrestclient/EndpointResolutionHelper.java
Outdated
Show resolved
Hide resolved
...client-plugin-common/src/main/java/co/elastic/apm/agent/esrestclient/RequestEndpointMap.java
Outdated
Show resolved
Hide resolved
...mon/src/test/java/co/elastic/apm/agent/esrestclient/AbstractEsClientInstrumentationTest.java
Outdated
Show resolved
Hide resolved
...mon/src/test/java/co/elastic/apm/agent/esrestclient/AbstractEsClientInstrumentationTest.java
Outdated
Show resolved
Hide resolved
# Conflicts: # apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-8_x/pom.xml # apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-common/src/main/java/co/elastic/apm/agent/esrestclient/ElasticsearchRestClientInstrumentationHelper.java
Newest updates:
I had quiet a hard time grasping all the indirections with flags in the tests. That's why I decided to refactor them to use a validation builder ( |
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, I like the new test validation formats, it's clearer
What does this PR do?
Checklist
Added an API method or config option? Document in which version this will be introducedI have made corresponding changes to the documentation