-
Notifications
You must be signed in to change notification settings - Fork 205
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
NULL check missing in agent instrumentation code #506
Comments
I have also hit this issue. Here are the repro steps: 1.) Follow these steps to setup AI for dependencies: https://docs.microsoft.com/en-us/azure/application-insights/app-insights-java-agent 2.) Use the ToDo List sample app which is a Java SpringBoot app that uses the Azure Document DB library and App Insights library. Specifically, fork the code in the ai branch: https://github.com/Microsoft/todo-app-java-on-azure/tree/ai. 3.) Follow the ReadMe's steps to build and run the app (as shown here: https://github.com/Microsoft/todo-app-java-on-azure). When attempting to run the app, you'll get the following exception: Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.azure.documentdb.DocumentClient]: Factory method 'documentClient' threw exception; nested exception is java.lang.NullPointerException |
@nicolehaugen79 - is it possible you have not configured the necessary Beans to have the AppInsights filter properly configured. We were able to repro this issue when the filter was not properly configured in Spring Boot. See step 4 of this guide on how to configure AppInsights Filter in spring boot: https://github.com/AzureCAT-GSI/DevCamp/tree/master/HOL/java/06-appinsights |
Closing issue as the fix has been merged. #541 |
When the agent attempts to view the existing correlation headers it does not perform a NULL check here.
This can throw an exception during the filter pipeline and lead to an internal server error.
It is recommended that we add a check similar to this one to avoid a nullref exception.
It was see recently on a struts application using thew new 2.0.0-BETA SDK and form based security with j_security_check.
The text was updated successfully, but these errors were encountered: