@TejasShah-0975, thank you for the detailed response above. It helped me a lot to configure a test environment on an Azure Windows VM, to test with both servers and here are my findings/recommendations (I am summarizing the findings and step so that it would help others too looking for help on this topic):
For Azure Monitor OpenTelemetry-based auto-instrumentation for Java applications, the basic requirements are as below:
1. Point the JVM to the jar file
2. Set the Application Insights connection string
One of the most effective ways to troubleshoot issues related to it is to review the applicationinsights.log
file, which is created in the applicationinsights**.jar directory. However, in current scenario, the .log
file itself was not getting generated. This points to the fact that either the path mentioned is incorrect for the ApplicationInsights**.jar file OR that the supplied -javaagent
parameter for JVM did not take into effect.
---
Here are my recommendations/findings for the 2 servers:
1. JBOSS EAP 7.3 on Windows VM
There are two operating modes for JBOSS servers - Standalone Server and Managed domain. I observed that you were modifying the host.xml
file with -javaagent
parameter, but it looks like you are using JBOSS in standalone mode. Therefore, please update the JBOSS_HOME\bin\standalone.conf.bat
file to update the JAVA_OPTS
environment variable, to also include the -javaagent
parameter.
You may use Process Explorer to review the environment variables set for any process. Once the changes above were made, I noticed the following:
After verifying the above changes, I was able to get the applicationInsights.log file generated and verified that the data is getting ingested in the AppInsights workspace.
---
2. Pivotal TC Server
After going through the documentation and a couple of other reference materials, I came across this link - https://community.pivotal.io/s/article/Customizing-the-environment-or-JVM-options-for-vFabric-tc-Server?language=en_US
It states that - "When running tc Server as a service on Windows, JVM settings are specified in the conf/wrapper.conf file.".
The only change you need to make is to add wrapper.java.additional.X.
with value as -javaagent...
parameter, as shown below:
After making this change and restarting the tc server instance, the required JVM parameter for -javaagent
was supplied to process as verified using Process Explorer.
Please note, -javaagent
is used for instrumentation/profiling and the appinsights jar
file reference must be provided using this switch only. The way this switch is provided to JVM will depend on the Server technology being used. For more information, you may reach out to the respective Server support team about the configuration details.
If you have any questions specific to ApplicationInsights, please let me know.
---
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.