microsoft / ApplicationInsights-Java

Application Insights for Java
http://aka.ms/application-insights
Other
297 stars 199 forks source link

MySql dependency tree not available with applicationinsights-agent-3.5.1 #3667

Closed abhikt48 closed 4 months ago

abhikt48 commented 5 months ago

Expected behavior

  1. Mule 4 --> MySql dependency should be available in Application Insight (AI).
  2. Java --> End to End transaction should be available for multiple transports (MySQL + Mongo) . This is very less priority for us, just FYI, observed while testing.

Actual behavior

We need to use Mule 4 application to log all logs in Application Insight. As part of testing, we discoverd that MySql dependency is not available in AI, however mongo DB dependency is available. Please refer below image where there is no MySql dependency, dependency is not available without transaction ID as well.

Mule-No-MySql-DependencyTree

Just for replication, I did testing with plain java code and found that both (MySQL and Mongo) dependencies are available in AI. But there is no End To End transaction. Which is quite strange.

Java-Mysql-Dependency

To Reproduce

  1. Java - Refer this repo to replicate java-ai-db-test
  2. Mule - Refer this repo to replicate mule4-ai-db-test

I am not sure, how much comfortable you all with Mule 4. However you can run dependency tree or check if anything is missing in POM.

System information

Please provide the following information:

Please check above information and let me know for any concern.

abhikt48 commented 5 months ago

Can anyone please take a look on this issue ?

trask commented 5 months ago

hi @abhikt48, I don't have any good ideas about this, can you enable self-diagnostic logging at TRACE level and attach the applicationinsights.log from the failure case?

abhikt48 commented 5 months ago

@trask I have uploaded logs here applicationinsights.log , could you please check on this.

trask commented 5 months ago

hi @abhikt48,

since the MySql (jdbc) calls are hidden inside of Mule, it's hard to know if Mule is maybe using some jdbc api that's not instrumented, e.g. https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/4476

abhikt48 commented 4 months ago

Closing this issue, as we are focusing on MsSql. So we will track this issue here - https://github.com/microsoft/ApplicationInsights-Java/issues/3736