RARomano / ApplicationInsights.NodeJS

Monitoring Node JS applications with Applications Insights

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ApplicationInsights.NodeJS

This repository will show how to use Application Insights to monitor Node JS applications.

Creating an Application Insights account

First, create a free Azure account (if you don't have one): https://azure.microsoft.com/en-us/services/application-insights/

Then, create an Application Insights instance image

Select Node JS application image

When the instance is created, grab the Instrumentation Key image

Running the application

Modifiy the line 11 of the file index.js https://github.com/RARomano/ApplicationInsights.NodeJS/blob/master/index.js#L11 to add the Instrumentation Key generated on the previous step

Then run:

npm install
node index

Open the browser and make a request to http://localhost:8080/ping and then to http://localhost:8080/error. Wait a few moments and see the data being populated into the Application Insights dashboards.

image

About

Monitoring Node JS applications with Applications Insights


Languages

Language:JavaScript 100.0%