ApplicationInsights-Java icon indicating copy to clipboard operation
ApplicationInsights-Java copied to clipboard

HTTP trace collection stopped after upgrade to App Insights 3.5.4 for application based on Spring Boot 3.3.1

Open vap78 opened this issue 1 year ago • 4 comments

Expected behavior

HTTP traces should be collected and reported to application insights

Actual behavior

They are not. Only Service bus calls, logs and metrics are recorded

To Reproduce

We have a Spring Boot 3.3.1 / Java 21 application using Azure Application Insights integration. The library runs in agent mode as described here: https://learn.microsoft.com/en-us/azure/azure-monitor/app/java-spring-boot

After the upgrade to version 3.5.4 of the agent, we no longer receive http access log entries into our App Insights instance. Logs and metrics keep coming. Everything was working fine with the previous version we used: 3.4.2. I see that there is a breaking change in regard to http trace collection in the release notes, but the link with the details is broken.

Additional configuration we have on this instance - following env variables are set:

  • APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL: "ALL"
  • APPLICATIONINSIGHTS_INSTRUMENTATION_REDIS_ENABLED: "false"
  • APPLICATIONINSIGHTS_INSTRUMENTATION_JDBC_ENABLED: "false"
  • APPLICATIONINSIGHTS_INSTRUMENTATION_RABBITMQ_ENABLED: "false"
  • APPLICATIONINSIGHTS_INSTRUMENTATION_MICROMETER_ENABLED: "false"

System information

Please provide the following information:

  • SDK Version: 3.5.4
  • OS type and version: K8S container based on Alpine Linux
  • Application Server type and version (if applicable): Spring Boot 3.3.1 running on Open JDK 21
  • Using spring-boot: yes
  • Additional relevant libraries (with version, if applicable):

Logs

I attach logs from a sample start of a test instance that received some http requests.

Screenshots

If applicable, add screenshots to help explain your problem. out.txt

vap78 avatar Aug 14 '24 09:08 vap78

@vap78 can you please provide us a self-diagnostics log at the TRACE level? We want to confirm if tomcat 7 and jakarta servlet are both present in your application, which might cause some conflict in OpenTelemetry upstream.

APPLICATIONINSIGHTS_SELF_DIAGNOSTICS_LEVEL=TRACE

heyams avatar Aug 15 '24 17:08 heyams

Hi

attaching logs as requested.

Best regards Vasil logs.zip

vap78 avatar Aug 16 '24 07:08 vap78

@vap78 trace log confirmed that both jakarta and tomcat7 are present. Upstream has a fix, release is coming out today or early next week. We'll integrate it in version 3.6.0, which is planned to be released next week or the week after next week if no blocker. Please watch for our new releases.

heyams avatar Aug 16 '24 16:08 heyams

Thank you very much for the quick reaction :)

vap78 avatar Aug 16 '24 18:08 vap78