Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

applicationinsights

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

applicationinsights - npm Package Compare versions

Comparing version 0.10.1 to 0.10.2

appInsights.js

3

Context/ApplicationContext.js

@@ -1,2 +0,3 @@

var ApplicationContext = (function () {
/// <reference path="../Scripts/typings/node/node.d.ts" />
var ApplicationContext = (function () {
function ApplicationContext(config) {

@@ -3,0 +4,0 @@ /**

@@ -1,2 +0,3 @@

var os = require("os");
/// <reference path="../Scripts/typings/node/node.d.ts" />
var os = require("os");

@@ -3,0 +4,0 @@ var DeviceContext = (function () {

@@ -1,2 +0,3 @@

var LocationContext = (function () {
/// <reference path="../Scripts/typings/node/node.d.ts" />
var LocationContext = (function () {
function LocationContext(request) {

@@ -3,0 +4,0 @@ /**

@@ -1,2 +0,3 @@

var util = require('../Util');
/// <reference path="../Scripts/typings/node/node.d.ts" />
var util = require('../Util');
var SessionContext = (function () {

@@ -3,0 +4,0 @@ function SessionContext(request, response) {

@@ -1,2 +0,3 @@

var util = require('../Util');
/// <reference path="../Scripts/typings/node/node.d.ts" />
var util = require('../Util');
var UserContext = (function () {

@@ -3,0 +4,0 @@ function UserContext(request, response) {

@@ -5,3 +5,3 @@ {

"bugs": "https://github.com/Microsoft/AppInsights-node.js/issues",
"version": "0.10.1",
"version": "0.10.2",
"description": "Microsoft Application Insights module for Node.JS",

@@ -8,0 +8,0 @@ "repository": {

# Application Insights for Node.js
[Node](http://nodejs.org/) is a popular, lightweight platform for building fast and scalable network applications. This project extends Application Insights API surface to support Node.js. [Application Insights](http://msdn.microsoft.com/en-us/library/dn481095.aspx) is a service that allows developers to keep their application available, performing and succeeding. This node module will automatically send request telemetry and exceptions and logs for requests to the Application Insights service where they can be visualized in the [Azure Portal](https://portal.azure.com/).
[Node](http://nodejs.org/) is a popular, lightweight platform for building fast and scalable network applications. This project extends Application Insights API surface to support Node.js. [Application Insights](http://msdn.microsoft.com/en-us/library/dn481095.aspx) is a service that allows developers to keep their application available, performing and succeeding. This node module will automatically send request telemetry, exceptions and logs for requests to the Application Insights service where they can be visualized in the [Azure Portal](https://portal.azure.com/).

@@ -27,4 +27,18 @@ ## Set-Up

### Part One (Node site running as an Azure website)
Coming soon
1. Click on your website tile and scroll down to the Console tile. Type the command (as shown above) to install the module from the Node Package Manager. <br/> <img src="https://cloud.githubusercontent.com/assets/8000269/3898723/334d80b8-2270-11e4-9265-fea64fa8c4d9.png" width="600">
2. Scroll to the bottom of your website blade to the Extensions tile. Click the Add button and select Visual Studio Online and add the extension. You may need to refresh the current blade for it to appear on your list of extensions. <br/> <img src="https://cloud.githubusercontent.com/assets/8000269/3898727/335acae8-2270-11e4-9294-a53f68e2bb77.png" width="600">
3. Next, scroll to the top and in the Summary tile, click on the section that says Application Insights. Find your Node website in the list and click on it. Then click on the Properties tile and copy your instrumentation key. <br/> <img src="https://cloud.githubusercontent.com/assets/8000269/3898721/334b228c-2270-11e4-82a7-1bb158c3a843.png" width="600"> <br/> <img src="https://cloud.githubusercontent.com/assets/8000269/3898722/334c0e04-2270-11e4-81c9-2f6101ae12a9.png" width="600">
4. Go back to your Extensions tile and click on Visual Studio Online to open up the VSO blade. Click the Browse button to open VSO to edit your files. <br/> <img src="https://cloud.githubusercontent.com/assets/8000269/3898729/3361b43e-2270-11e4-9c07-0904f632e514.png" width="600">
5. Once you open VSO, click on the `ai.config.json` file and paste the instrumentation key into the iKey field. <br/> <img src="https://cloud.githubusercontent.com/assets/8000269/3898726/335aa798-2270-11e4-970c-d81754cadeb6.png" width="600">
6. Next, in the `server.js` file, enter the require statement as stated above. <br/> <img src="https://cloud.githubusercontent.com/assets/8000269/3898728/335aea0a-2270-11e4-9545-27e5d0baac57.png" width="600">
7. Open your website and click on a link to generate a request. <br/>
8. Return to your project tile in the Azure Portal. You can view your requests in the Monitoring tile.
### Part Two (Node site running as a NON-Azure website)

@@ -35,3 +49,3 @@ #### Creating an Application Insights resource in the Azure Portal

2. Enter a name for your new AI project and click create. A new tile will appear on your dashboard. <br/>
2. Enter a name for your new Application Insights resource and click create. A new tile will appear on your dashboard. <br/>
<img src="https://cloud.githubusercontent.com/assets/8000269/3832826/3b671972-1da1-11e4-869c-49b36ad7c194.png" width="600">

@@ -43,6 +57,8 @@

4. Copy and paste your iKey into the iKey variable in your `ai.config.json` file. <br/>
<img src="https://cloud.githubusercontent.com/assets/8000269/3833430/706d3a60-1da7-11e4-85f1-430240d823fa.png" width="600">
<img src="https://cloud.githubusercontent.com/assets/8000269/3832827/3b681cf0-1da1-11e4-9cdc-e8e7eb7f5496.png" width="600">
5. Run your application and generate a request. <br/>
6. Return to your project tile in the Azure Portal and you can view your requests in the Requests tile in your application's blade. (In my example, you can see that I have generate 10 requests and it took 1 ms to process them). <br/>
5. Open your `server.js` file that was generated when you installed the module, and entire the require statement as stated above. <br/> <img src="https://cloud.githubusercontent.com/assets/8000269/3899210/209207fc-2278-11e4-960b-1b5144d73718.png" width="600">
6. Run your application and generate a request. <br/>
7. Return to your project tile in the Azure Portal and you can view your requests in the Requests tile in your application's blade. (In my example, you can see that I have generate 10 requests and it took 1 ms to process them). <br/>
<img src="https://cloud.githubusercontent.com/assets/8000269/3832825/3b66974a-1da1-11e4-87f2-774cb2746c30.png" width="600">

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc