New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

appinsights-logger

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appinsights-logger - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

16

dist/index.js

@@ -5,13 +5,13 @@ "use strict";

const samplingRulesByUrl_1 = require("./samplingRulesByUrl");
const clientKey = (process.env.APPINSIGHTS_INSTRUMENTATIONKEY || "fake");
const messageNamespace = (process.env.AI_MESSAGE_NAMESPACE || "missingnamespace");
const clientKey = (process.env.APPINSIGHTS_INSTRUMENTATIONKEY || 'fake');
const messageNamespace = (process.env.AI_MESSAGE_NAMESPACE || 'missingnamespace');
appInsights.setup(clientKey)
.setAutoDependencyCorrelation((process.env.AI_AUTO_DEPENDENCY_CORRELATE === 'false' ? false : true))
.setAutoDependencyCorrelation((process.env.AI_AUTO_DEPENDENCY_CORRELATE !== 'false'))
.setAutoCollectRequests(true)
.setAutoCollectPerformance(true, true)
.setAutoCollectExceptions(true)
.setAutoCollectDependencies((process.env.AI_AUTOCOLLECT_DEPENDENCIES === 'false' ? false : true))
.setAutoCollectDependencies((process.env.AI_AUTOCOLLECT_DEPENDENCIES !== 'false'))
.setAutoCollectConsole(true)
.setUseDiskRetryCaching(true)
.setSendLiveMetrics(false)
.setSendLiveMetrics(true)
.setDistributedTracingMode(appInsights.DistributedTracingModes.AI_AND_W3C);

@@ -74,5 +74,5 @@ exports.ai = appInsights; // in case you need to override setup()

exports.ai.defaultClient.trackRequest({
name: context.req.method + " " + context.req.url,
name: context.req.method + ' ' + context.req.url,
resultCode: context.res.status,
success: true,
success: context.res.status < 400,
url: req.url,

@@ -98,3 +98,3 @@ duration: Date.now() - startTime,

*/
function functionWrapper(fn, eventName = "FUNCTION_EXECUTION", customDimensions = {}) {
function functionWrapper(fn, eventName = 'FUNCTION_EXECUTION', customDimensions = {}) {
return async function contextPropagationTrigger(context) {

@@ -101,0 +101,0 @@ const correlationContext = exports.ai.startOperation(context, context.executionContext.functionName);

{
"name": "appinsights-logger",
"version": "0.3.3",
"version": "0.3.4",
"description": "thin, yet opinionated wrapper for applcation insights",

@@ -13,2 +13,3 @@ "repository": "gopuff/appinsights-logger",

"prepublishOnly": "npm run build",
"lint": "standardx .",
"test": "node test/index.js"

@@ -28,6 +29,9 @@ },

"@types/node": "^13.9.8",
"@typescript-eslint/eslint-plugin": "^4.22.1",
"@typescript-eslint/parser": "^4.22.1",
"del-cli": "^3.0.1",
"dotenv": "^8.2.0",
"standardx": "^7.0.0",
"typescript": "^3.8.3"
}
}

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