I have installed the applicationinsights-native-metrics package mentioned here: https://learn.microsoft.com/en-us/azure/azure-monitor/app/nodejs
I assume my app is generating metrics mentioned in the article but I can’t quite figure out how to view them in Application Insights. Any pointers would be greatly appreciated.
It was suggested to me that I should be seeing a new namespace in the Metrics Explorer in Application Insights called "Node.js Extended Metrics" but I don’t see this.
The documentation says you just need to install the package. After that didn’t work, I tried explicitly requiring it in the app. Neither worked.
2
Answers
By using the below code and applicationinsights-native-metrics package, I generated the metrics as mentioned in this document.
I ran the below commands to install the packages.
server.js:
package.json:
After running below command,
I could be able to view the logs in Transaction search of Application Insights in Azure Portal as below,
In Application Insights, go to Monitoring section, select Metrics, in Metric Namespace under Custom select azure.applicationinsights as below,
After updating the above metric namespace,you could be able to see the below Metrics.
For me, just having the applicationinsights version to 2.9.5 worked, i didnt have to add the other dependencies.
I did get the same error using the latest version however.