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

Enabling Application Insights from Mule Application Options.

Open rampratapa opened this issue 1 year ago • 14 comments

Hi, Good evening, I am trying to enable AppInsights into a Mulesoft API to do POC. I came across the following article on implementing the AppInsights using log4j appender.

https://help.mulesoft.com/s/article/Add-Microsoft-Application-Insights-Log-Appender-In-Mule-4-Application

The above article works and it is sending log data to App Insight workspace but it is not send dependencies and other information to the workspace to create Application MAP etc. Also the above article says "This document applies to Application Insights Java 2.x which is no longer recommended (although not excluded from use) by Microsoft. Documentation for the latest version can be found at Application Insights Java 3.x, however, this new version requires the addition of a jar file that can be called using -javaagent. We don't support the use of -javaagent on Cloudhub or Runtime Fabric at this time."

Based on the Microsoft website (https://github.com/microsoft/ApplicationInsights-Java/releases/tag/3.4.0) there is no need of Log4j2 as it automatically captured if we use agent. How can we invoke/start the agent within API using configuration ( like spring bean and DI) not using java argument to pass the JAR file. Is this feature is available with current version or can we use applicationinsights-runtime-attach or any other wrapper to invoke it. Can anyone provide some guidance so that we can implement AppInsights in Mulesoft API application.

Thank you for your help.

Thanks Ram

rampratapa avatar Mar 28 '23 21:03 rampratapa