I am trying to setup ai with jmx metrics. I only found a hint how this could work here. So my ApplicationInsights.xml contains this:
<PerformanceCounters>
<Jmx>
<Add objectName="java.lang:type=ClassLoading" attribute="TotalLoadedClassCount"
displayName="Loaded Class Count"/>
<Add objectName="java.lang:type=Memory" attribute="HeapMemoryUsage.used"
displayName="Heap Memory Usage-used" type="composite"/>
<Add objectName="java.lang:type=Threading"
attribute="ThreadCount" displayName="Thread Count"/>
<Add objectName="java.lang:type=GarbageCollector,name=PS MarkSweep"
attribute="CollectionCount" displayName="GC MarkSweep Count"/>
<Add objectName="java.lang:type=GarbageCollector,name=PS Scavenge"
attribute="CollectionCount" displayName="GC Scavange Count"/>
</Jmx>
</PerformanceCounters>
But the JMX metrics do not appear in azure.
The SDKLogging of the applicationinsights.xml configuration looks like this:
AI: INFO 20-12-2017 09:12, 1: Configuration file has been successfully found as resource
AI: INFO 20-12-2017 09:12, 1: 'MaxTelemetryBufferCapacity': null value is replaced with '500'
AI: INFO 20-12-2017 09:12, 1: 'FlushIntervalInSeconds': null value is replaced with '5'
AI: TRACE 20-12-2017 09:12, 1: Using Http Client version 4.3+
AI: INFO 20-12-2017 09:12, 1: 'Channel.MaxTransmissionStorageCapacityInMB': null value is replaced with '10'
AI: TRACE 20-12-2017 09:12, 1: C:\Users\sli\AppData\Local\Temp\AISDK\native\1.0.9 folder exists
AI: ERROR 20-12-2017 09:12, 1: Failed to load native dll, Windows performance counters will not be used. Please make sure that Visual C++ Redistributable is properly installed: C:\Users\sli\AppData\Local\Temp\AISDK\native\1.0.9\applicationinsights-core-native-win64.dll: Can't find dependent libraries.
AI: ERROR 20-12-2017 09:12, 1: Failed to initialize JNI connection.
AI: INFO 20-12-2017 09:43, 1: Configuration file has been successfully found as resource
AI: INFO 20-12-2017 09:43, 1: 'MaxTelemetryBufferCapacity': null value is replaced with '500'
AI: INFO 20-12-2017 09:43, 1: 'FlushIntervalInSeconds': null value is replaced with '5'
AI: INFO 20-12-2017 09:43, 1: 'Channel.MaxTransmissionStorageCapacityInMB': null value is replaced with '10'
AI: TRACE 20-12-2017 09:44, 1: C:\Users\sli\AppData\Local\Temp\AISDK\native\1.0.9 folder exists
AI: ERROR 20-12-2017 09:44, 1: Failed to load native dll, Windows performance counters will not be used. Please make sure that Visual C++ Redistributable is properly installed: C:\Users\sli\AppData\Local\Temp\AISDK\native\1.0.9\applicationinsights-core-native-win64.dll: Can't find dependent libraries.
AI: ERROR 20-12-2017 09:44, 1: Failed to initialize JNI connection.
AI: TRACE 20-12-2017 09:44, 1: Registering PC 'DeadLockDetector'
AI: TRACE 20-12-2017 09:44, 1: Registering PC 'JvmHeapMemoryUsedPerformanceCounter'
AI: ERROR 20-12-2017 09:44, 1: Failed to create WindowsPerformanceCounterAsPC: 'com.microsoft.applicationinsights.internal.perfcounter.JniPCConnector.addCounter(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;'
AI: TRACE 20-12-2017 09:44, 1: Registering PC 'JSDK_ProcessMemoryPerformanceCounter'
AI: TRACE 20-12-2017 09:44, 1: Registering PC 'JSDK_ProcessCpuPerformanceCounter'
AI: TRACE 20-12-2017 09:44, 1: Registering PC 'DeadLockDetector'
AI: TRACE 20-12-2017 09:44, 1: Failed to store performance counter 'DeadLockDetector', since there is already one
AI: TRACE 20-12-2017 09:44, 1: Registering PC 'JvmHeapMemoryUsedPerformanceCounter'
AI: TRACE 20-12-2017 09:44, 1: Failed to store performance counter 'JvmHeapMemoryUsedPerformanceCounter', since there is already one
AI: ERROR 20-12-2017 09:44, 1: Failed to create WindowsPerformanceCounterAsPC: 'com.microsoft.applicationinsights.internal.perfcounter.JniPCConnector.addCounter(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;'
AI: TRACE 20-12-2017 09:44, 1: Registering PC 'JSDK_ProcessMemoryPerformanceCounter'
AI: TRACE 20-12-2017 09:44, 1: Failed to store performance counter 'JSDK_ProcessMemoryPerformanceCounter', since there is already one
AI: TRACE 20-12-2017 09:44, 1: Registering PC 'JSDK_ProcessCpuPerformanceCounter'
AI: TRACE 20-12-2017 09:44, 1: Failed to store performance counter 'JSDK_ProcessCpuPerformanceCounter', since there is already one
The web app is running with an embedded jetty and I am using version 1.0.9 (can´t use 1.0.10 because of #502)
I am trying to setup ai with jmx metrics. I only found a hint how this could work here. So my ApplicationInsights.xml contains this:
But the JMX metrics do not appear in azure.
The SDKLogging of the applicationinsights.xml configuration looks like this:
What am I missing?
The web app is running with an embedded jetty and I am using version 1.0.9 (can´t use 1.0.10 because of #502)