-
Notifications
You must be signed in to change notification settings - Fork 199
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
NullPointerException from reactornetty instrumentation introduced in version 3.4.16 #3295
Comments
hi @paul-kraftlauget, thanks for reporting this! my guess is that this regression came from open-telemetry/opentelemetry-java-instrumentation#8111 I'm curious if this PR will resolve the issue for you: open-telemetry/opentelemetry-java-instrumentation#9286 'm working on getting you a build for that PR and will post back here with link and instructions how to test using the upstream OpenTelemetry Java agent. |
@paul-kraftlauget can you test with this upstream java agent SNAPSHOT build? https://github.com/open-telemetry/opentelemetry-java-instrumentation/suites/16262373066/artifacts/928504346 you can run with
this will cause telemetry to be logged instead of sent anywhere the key is whether this upstream version still exhibits the NPE if it doesn't exhibit the NPE, can you also test the latest upstream release to verify that does exhibit the NPE? https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.30.0/opentelemetry-javaagent.jar thanks! |
Thank you for your quick responses. I think the opentelemetry stuff is shaded (repackaged) inside the app insights agent runtime. So I would remove app insights runtime dependency, and run my application with the opentelemetry-javaagent instead? I'll give it a try. :-) |
@trask - I have now tested and see the issue unfortunately still exists in opentelemetry-javaagent version 1.31.0-SNAPSHOT. I have tested with different versions of opentelemetry-javaagent: |
Shall I register a bug directly on opentelemetry then since the issue appears to be due to that library and not the appinsights agent? |
sure, that would be great, you can leave this one open as well to track including the fix into Application Insights as well |
hi @paul-kraftlauget, thanks for reporting this upstream! the fix is merged upstream and will go out in the upstream Oct release, and then in the Application Insights Java Oct release which usually follows the upstream release by a week. |
I have verified that the upstream opentelemetry-javaagent 1.31.0 works as expected. Thanks for your help! |
Should be resolved now in Application Insights Java 3.4.18 |
Expected behavior
No failures
Actual behavior
NullPointerException occurs from reactornetty instrumentation when issuing a HTTP GET request
Please note that 3.4.15 works fine. 3.4.16 fails.
The culprit seems to be when our application reaches out to obtain a security token through another HTTP GET before invoking the actual HTTP GET. Consider this code when we setup the netty HttpClient:
So we have one HTTP client request started, then reactively, we add the authorization header by calling an oauth2 endpoint. The oauth2 endpoint HTTP request and response is successful, but the client request using the header/token fails.
I would guess that the context is cleared somehow when the first nested request/response finishes, leaving a NullPointerException when primary request is issued.
System information
Please provide the following information:
Logs
The text was updated successfully, but these errors were encountered: