Skip to content
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

HTTP requests telemetry data is not send by ApplicationInsights-Java after upgrading Tomcat version 9 to 10 (containing javax.* to jakarta.* namespace change) #1800

Closed
GideonTer opened this issue Jul 16, 2021 · 3 comments · Fixed by #1804

Comments

@GideonTer
Copy link

Expected behavior

We upgraded our Tomcat version from version 9 to 10, under which our services are now running (Apache Tomcat Version 10.0.8).This upgrade contains a change in the javax.* to jakarta.* namespace.
I'd expect following the upgrade (and possible converting the applicationinsights-agent.jar with the migration tool) that our service would keep on sending http request data to ApplicationInsights through use of the java option: -javaagent:D:\java\appinsights\applicationinsights-agent.jar

Actual behavior

Following this upgrade, the service is no longer communicating the http request telemetry data to ApplicationInsight, where under Tomcat 9 this worked fine.
Other data is still processed, TRACE and DEPENDENCY transactions for example, are still present in the transaction search in Azure.
With the Tomcat10 upgrade there was need for some .jar's to be converted with the jakartaee-migration-1.0.0 tool. This in order to make alterations for the namespace change from javax.* to jakarta.*.
We tried running the applicationinsights-agent3.1.1.jar, both with and without conversion through the migration tool, but in all cases it's not working with Tomcat10.
Running the service under Tomcat9 again instantly restores the sending of http requests data to ApplicationInsights.

To Reproduce

The above mentioned upgrade of the Tomcat10 version on a Tomcat service using the java agent for ApplicationInsights

System information

  • Apache Tomcat Version 10.0.8
  • AdoptOpenJDK-16.0.1+9
  • SDK Version: 3.1.1
  • OS type and version: Windows server 2019
  • Using spring-boot? No

Logs

Two applicationinsights.log files are attached at DEBUG level.

  1. applicationinsightsNOTCONV.log shows the log with the non converted applicationinsights-agent3.1.1.jar
  2. applicationinsights.CONV.log shows the log with the converted applicationinsights-agent3.1.1.jar (converted with jakartaee-migration-1.0.0 tool)

In both logging examples, the following steps are logged:

  1. service is started
  2. a http request is made and processed by the service
  3. service is stopped.

applicationinsightsNOTCONV.log
applicationinsights.CONV.log

In the Tomcat9HttpRequestLines.txt 2 log lines on the http request telemtry (http.url) are shown from when the service while running under Tomcat9. These lines, for the same http request do not appear in the logs when running Tomcat 10.
Tomcat9HttpRequestLines.txt

@trask
Copy link
Member

trask commented Jul 22, 2021

@GideonTer thanks for posting! support for Servlet 5.0 has been merged and will be included in the next release

@trask trask added this to the 3.2.0-BETA.2 milestone Jul 23, 2021
@trask
Copy link
Member

trask commented Aug 4, 2021

this should be resolved now in 3.2.0-BETA.2

@GideonTer
Copy link
Author

A quick test in our environment shows this issue is indeed solved, and functions again as expected. Thanks for fixing the issue!

@ghost ghost locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants