Huge News!Announcing our $40M Series B led by Abstract Ventures.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.1.1 to 0.2.0

1

dist/index.d.ts

@@ -22,2 +22,3 @@ import * as appInsights from 'applicationinsights';

export declare function addMetadataProps<T extends Telemetry>(telemetry: T): T;
export declare function httpTriggerWrapper(fn: any, customDimensions?: {}): (context: any, req: any) => Promise<void>;
export {};

@@ -66,2 +66,21 @@ "use strict";

exports.addMetadataProps = addMetadataProps;
function httpTriggerWrapper(fn, customDimensions = {}) {
return async function contextPropagatingHttpTrigger(context, req) {
const correlationContext = exports.ai.startOperation(context, req);
return exports.ai.wrapWithCorrelationContext(async () => {
const startTime = Date.now();
await fn(context, req);
exports.ai.defaultClient.trackRequest({
name: context.req.method + " " + context.req.url,
resultCode: context.res.status,
success: true,
url: req.url,
duration: Date.now() - startTime,
id: correlationContext.operation.parentId,
properties: customDimensions
});
}, correlationContext)();
};
}
exports.httpTriggerWrapper = httpTriggerWrapper;
//# sourceMappingURL=index.js.map

4

package.json
{
"name": "appinsights-logger",
"version": "0.1.1",
"version": "0.2.0",
"description": "thin, yet opinionated wrapper for applcation insights",

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

"dependencies": {
"applicationinsights": "^1.7.3"
"applicationinsights": "^1.8.10"
},

@@ -26,0 +26,0 @@ "devDependencies": {

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