Welcome to Microsoft Q&A! Thanks for posting the question.
I understand that you are trying to measure heap related memory utilization by JVM. I would recommend referring this this doc for relevant information - Configuring JMX metrics
To Summarize, Application Insights Java 3.x collects some of the JMX metrics by default. If the default ones are not enough, you can collect additional metrics by configuring the jmxMetrics
section to the applicationinsights.json
file. Please note that, to be able to update the jmxMetrics section, you must know the object names and the attributes, those properties are different for various libraries, frameworks, and application servers, and are often not well documented. To be able to view the available metrics, et the self-diagnostics level to DEBUG
in your applicationinsights.json
configuration file. This would give you all the available JMX metrics, with object names and attribute names in the application insights log file, which can be used to update the jmxMetrics
section to the applicationinsights.json
file.
The following link has the complete information in this regards: Configuring JMX metrics.
Please let me know if you have any questions.
---
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.