Skip to content

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

Description

@GideonTer

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

Activity

  1. trask commented on Jul 22, 2021

    @trask
    Member

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

  2. trask commented on Aug 4, 2021

    @trask
    Member

    this should be resolved now in 3.2.0-BETA.2

  3. GideonTer commented on Aug 6, 2021

    @GideonTer
    Author

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

  4. ghost locked as resolved and limited conversation to collaborators on Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions