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.0.6 to 0.1.0

dist/samplingRulesByUrl.d.ts

4

dist/index.d.ts
import * as appInsights from 'applicationinsights';
import { EventTelemetry, DependencyTelemetry, ExceptionTelemetry, MetricTelemetry, RequestTelemetry, TraceTelemetry } from 'applicationinsights/out/Declarations/Contracts';
import { RulesDictonary } from './samplingRulesByUrl';
export declare const ai: typeof appInsights;
export declare const aiClient: appInsights.TelemetryClient;
export declare const ai: typeof appInsights;
export declare function trackEvent(telemetry: EventTelemetry): void;

@@ -19,2 +20,3 @@ export declare function trackException(telemetry: ExceptionTelemetry): void;

export declare function measureDependency(marker: IMarker, data?: string, success?: boolean): void;
export declare function samplingRulesByUrl(rulesDictionary: RulesDictonary): void;
export {};

@@ -5,2 +5,3 @@ "use strict";

const clientKey = (process.env.APPINSIGHTS_INSTRUMENTATIONKEY || "fake");
const samplingRulesByUrl_1 = require("./samplingRulesByUrl");
appInsights.setup(clientKey)

@@ -15,6 +16,7 @@ .setAutoDependencyCorrelation((process.env.AI_AUTO_DEPENDENCY_CORRELATE === 'false' ? false : true))

.setSendLiveMetrics(false)
.setDistributedTracingMode(appInsights.DistributedTracingModes.AI_AND_W3C)
.start();
.setDistributedTracingMode(appInsights.DistributedTracingModes.AI_AND_W3C);
exports.ai = appInsights; // in case you need to override setup()
exports.aiClient = appInsights.defaultClient;
exports.ai = appInsights; // in case you need to override setup()
exports.aiClient.config.samplingPercentage = parseInt(process.env.AI_SAMPLING_PERCENTAGE || '100');
exports.ai.start();
const debugInsightsEnabled = (process.env.DEBUG_INSIGHTS === 'true') || false;

@@ -52,2 +54,6 @@ exports.aiClient.context.tags[exports.aiClient.context.keys.cloudRole] = process.env.WEBSITE_SITE_NAME || 'defaultCloudRole';

exports.measureDependency = measureDependency;
function samplingRulesByUrl(rulesDictionary) {
samplingRulesByUrl_1.addSamplingRulesByUrl(rulesDictionary, exports.aiClient);
}
exports.samplingRulesByUrl = samplingRulesByUrl;
//# sourceMappingURL=index.js.map
{
"name": "appinsights-logger",
"version": "0.0.6",
"version": "0.1.0",
"description": "thin, yet opinionated wrapper for applcation insights",

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

"@types/node": "^13.9.8",
"del-cli": "^3.0.0",
"del-cli": "^3.0.1",
"dotenv": "^8.2.0",

@@ -30,0 +30,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