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.15.16 to 0.15.17

.ntvs_analysis.dat

17

AutoCollection/RequestDataHelper.js

@@ -58,4 +58,6 @@ ///<reference path="..\Declarations\node\node.d.ts" />

newTags[RequestDataHelper.keys.locationIp] = this._getIp();
newTags[RequestDataHelper.keys.sessionId] = this._getSessionId();
newTags[RequestDataHelper.keys.sessionId] = this._getId("ai_session");
newTags[RequestDataHelper.keys.userId] = this._getId("ai_user");
newTags[RequestDataHelper.keys.userAgent] = this.userAgent;
newTags[RequestDataHelper.keys.operationName] = this.method + " " + url.parse(this.url).pathname;
return newTags;

@@ -71,6 +73,10 @@ };

var encrypted = request.connection ? request.connection.encrypted : null;
var requestUrl = url.parse(request.url);
var pathName = requestUrl.pathname;
var search = requestUrl.search;
var absoluteUrl = url.format({
protocol: encrypted ? "https" : "http",
host: request.headers.host,
pathname: request.url
pathname: pathName,
search: search
});

@@ -104,10 +110,9 @@ return absoluteUrl;

};
RequestDataHelper.prototype._getSessionId = function () {
var name = "ai_session";
RequestDataHelper.prototype._getId = function (name) {
var cookie = (this.rawHeaders && this.rawHeaders["cookie"] &&
typeof this.rawHeaders["cookie"] === 'string' && this.rawHeaders["cookie"]) || "";
var value = RequestDataHelper.parseSessionId(Util.getCookie(name, cookie));
var value = RequestDataHelper.parseId(Util.getCookie(name, cookie));
return value;
};
RequestDataHelper.parseSessionId = function (cookieValue) {
RequestDataHelper.parseId = function (cookieValue) {
return cookieValue.substr(0, cookieValue.indexOf('|'));

@@ -114,0 +119,0 @@ };

@@ -6,3 +6,3 @@ ///<reference path="..\Declarations\node\node.d.ts" />

this.instrumentationKey = instrumentationKey || this._getInstrumentationKey();
this.endpointUrl = "http://dc.services.visualstudio.com/v2/track";
this.endpointUrl = "https://dc.services.visualstudio.com/v2/track";
this.sessionRenewalMs = 30 * 60 * 1000;

@@ -9,0 +9,0 @@ this.sessionExpirationMs = 24 * 60 * 60 * 1000;

@@ -42,3 +42,2 @@ ///<reference path="..\Declarations\node\node.d.ts" />

this.tags[this.keys.deviceOSVersion] = os && os.release();
this.tags[this.keys.deviceType] = "server";
// not yet supported tags

@@ -45,0 +44,0 @@ this.tags["ai.device.osArchitecture"] = os && os.arch();

@@ -90,3 +90,3 @@ "use strict";

Util.isError = function (obj) {
return Object.prototype.toString.call(obj) === "[object Error]";
return obj instanceof Error;
};

@@ -93,0 +93,0 @@ /**

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

"bugs": "https://github.com/Microsoft/ApplicationInsights-node.js/issues",
"version": "0.15.16",
"version": "0.15.17",
"description": "Microsoft Application Insights module for Node.JS",

@@ -23,2 +23,6 @@ "repository": {

{
"name": "Application Insights Developer Support",
"email": "aidevsupport@microsoft.com"
},
{
"name": "scsouthw",

@@ -25,0 +29,0 @@ "email": "scsouthw@microsoft.com"

@@ -157,1 +157,3 @@ # Application Insights for Node.js

```
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
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