-
Notifications
You must be signed in to change notification settings - Fork 867
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
Use elastic rest client will occur NullPointerException in ApacheHttpClientRequest #3659
Comments
hi @zmapleshine! can you check if this was an issue in v1.3.0 also? just trying to see if this is a regression in v1.4.0 or not |
There was no such error in 1.3.x release. This version does not need to extract "peerPort" from every request. I think resolve port numbers from scheme should add a non-null judgment? |
hey @zmapleshine, I'm trying to understand why our tests don't run into this same issue. The apache httpasyncclient instrumentation should get skipped when elasticsearch is enabled, since we only capture the first CLIENT span (elasticsearch in this case). Are you by any chance suppressing elasticsearch instrumentation (e.g. passing system property |
Yes , I turned off elasticsearch instrumentation by "otel.instrumentation.elasticsearch.enabled=false" |
@zmapleshine thanks for reporting this! it is now fixed and released in version 1.4.1 |
Describe the bug
Use elastic rest client will occur NullPointerException in ApacheHttpClientRequest:
opentelemetry-java-instrumentation/instrumentation/apache-httpasyncclient-4.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpasyncclient/ApacheHttpClientRequest.java
Line 126 in 1b5df6d
I use 'spring-boot-starter-data-elasticsearch' in Spring Boot project.This project contains module 'elasticsearch-rest-client:7.6.2'.
When the project during the health check phase, however, because the
getPeerPort
method of theApacheHttpClientRequest
class in the instrument code of the "Apache-Httpasyncclient-4.1" component will always fetch the schema, but it may be null.Steps to reproduce
If possible, provide a recipe for reproducing the error.
step 1:
build a simple spring boot project that with 'spring-boot-starter-data-elasticsearch'.
step2:
config elastic cluster address in application.yml
What did you expect to see?
No NullPointException error
What did you see instead?
What version are you using?
v1.4.0
Environment
Compiler: (JDK 11.0.10")
OS: macos Big sur 11.2.3
Additional context
None
The text was updated successfully, but these errors were encountered: