Socket
Socket
Sign inDemoInstall

@microsoft/applicationinsights-common

Package Overview
Dependencies
Maintainers
5
Versions
563
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/applicationinsights-common - npm Package Compare versions

Comparing version 1.0.0-beta.8 to 1.0.0-beta.9

2

browser/applicationinsights-common.min.js
/*!
* Application Insights JavaScript SDK - Common, 1.0.0-beta.8
* Application Insights JavaScript SDK - Common, 1.0.0-beta.9
* Copyright (c) Microsoft and contributors. All rights reserved.

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

/*!
* Application Insights JavaScript SDK - Common, 1.0.0-beta.8
* Application Insights JavaScript SDK - Common, 1.0.0-beta.9
* Copyright (c) Microsoft and contributors. All rights reserved.

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

{
"name": "@microsoft/applicationinsights-common",
"version": "1.0.0-beta.8",
"version": "1.0.0-beta.9",
"description": "Microsoft Application Insights Common JavaScript Library",

@@ -31,5 +31,5 @@ "main": "./dist/applicationinsights-common.js",

"dependencies": {
"@microsoft/applicationinsights-core-js": "^1.0.0-beta.2"
"@microsoft/applicationinsights-core-js": "^1.0.0-beta.3"
},
"license": "MIT"
}

@@ -5,39 +5,259 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

export interface IConfig {
/**
* @description Configuration settings for how telemetry is sent
* @export
* @interface IConfig
*/
export interface IConfig {
/**
* @description
* @type {boolean}
* @memberof IConfig
*/
emitLineDelimitedJson?: boolean;
/**
* @description An optional account id, if your app groups users into accounts. No spaces, commas, semicolons, equals, or vertical bars.
* @type {string}
* @memberof IConfig
*/
accountId?: string;
/**
* @description A session is logged if the user is inactive for this amount of time in milliseconds. Default 30 mins.
* @type {number}
* @memberof IConfig
* @default 30*1000
*/
sessionRenewalMs?: number;
/**
* @description A session is logged if it has continued for this amount of time in milliseconds. Default 24h.
* @type {number}
* @memberof IConfig
* @default 24*60*60*1000
*/
sessionExpirationMs?: number;
/**
* @description Max size of telemetry batch. If batch exceeds limit, it is sent and a new batch is started
* @type {number}
* @memberof IConfig
* @default 100000
*/
maxBatchSizeInBytes?: number;
/**
* @description How long to batch telemetry for before sending (milliseconds)
* @type {number}
* @memberof IConfig
* @default 15 seconds
*/
maxBatchInterval?: number;
/**
* @description If true, debugging data is thrown as an exception by the logger. Default false
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
enableDebug?: boolean;
/**
* @description If true, exceptions are not autocollected. Default is false
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
disableExceptionTracking?: boolean;
/**
* @description If true, telemetry is not collected or sent. Default is false
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
disableTelemetry?: boolean;
consoleLoggingLevel?: number;
telemetryLoggingLevel?: number;
diagnosticLogInterval?: number;
/**
* @description Percentage of events that will be sent. Default is 100, meaning all events are sent.
* @type {number}
* @memberof IConfig
* @defaultValue 100
*/
samplingPercentage?: number;
/**
* @description
* @type {boolean}
* @memberof IConfig
*/
autoTrackPageVisitTime?: boolean;
/**
* @description If true, Ajax calls are not autocollected. Default is false
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
disableAjaxTracking?: boolean;
/**
* @description If true, Fetch requests are not autocollected. Default is true.
* @type {boolean}
* @memberof IConfig
* @defaultValue true
*/
disableFetchTracking?: boolean;
/**
* @description If true, default behavior of trackPageView is changed to record end of page view duration interval when trackPageView is called. If false and no custom duration is provided to trackPageView, the page view performance is calculated using the navigation timing API. Default is false
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
overridePageViewDuration?: boolean;
/**
* @description Default 500 - controls how many ajax calls will be monitored per page view. Set to -1 to monitor all (unlimited) ajax calls on the page.
* @type {number}
* @memberof IConfig
*/
maxAjaxCallsPerView?: number;
/**
* @ignore
* @description If false, internal telemetry sender buffers will be checked at startup for items not yet sent. Default is true
* @type {boolean}
* @memberof IConfig
* @defaultValue true
*/
disableDataLossAnalysis?: boolean;
/**
* @description If false, the SDK will add two headers ('Request-Id' and 'Request-Context') to all dependency requests to correlate them with corresponding requests on the server side. Default is false.
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
disableCorrelationHeaders?: boolean;
/**
* @description Disable correlation headers for specific domain
* @type {string[]}
* @memberof IConfig
*/
correlationHeaderExcludedDomains?: string[];
/**
* @description Default false. If true, flush method will not be called when onBeforeUnload event triggers.
* @type {boolean}
* @memberof IConfig
*/
disableFlushOnBeforeUnload?: boolean;
/**
* @description If true, the buffer with all unsent telemetry is stored in session storage. The buffer is restored on page load. Default is true.
* @type {boolean}
* @memberof IConfig
* @defaultValue true
*/
enableSessionStorageBuffer?: boolean;
/**
* @description If true, the SDK will not store or read any data from cookies. Default is false.
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
isCookieUseDisabled?: boolean;
/**
* @description Custom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains.
* @type {string}
* @memberof IConfig
* @defaultValue ""
*/
cookieDomain?: string;
/** Default false. If false, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error), 503 (service unavailable), and 0 (offline, only if detected)
* @description
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
isRetryDisabled?: boolean;
/**
* @deprecated Used when initizialing from snippet only.
* @description The url from where the JS SDK will be downloaded. Default 'https://az416426.vo.msecnd.net/scripts/beta/ai.1.js'
* @type {string}
* @memberof IConfig
* @defaultValue "https://az416426.vo.msecnd.net/scripts/beta/ai.1.js"
*/
url?: string;
/**
* @description If true, the SDK will not store or read any data from local and session storage. Default is false.
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
isStorageUseDisabled?: boolean;
/**
* @description If false, the SDK will send all telemetry using the [Beacon API](https://www.w3.org/TR/beacon)
* @type {boolean}
* @memberof IConfig
* @defaultValue true
*/
isBeaconApiDisabled?: boolean;
/**
* @description Sets the sdk extension name. Only alphabetic characters are allowed. The extension name is added as a prefix to the 'ai.internal.sdkVersion' tag (e.g. 'ext_javascript:2.0.0'). Default is null.
* @type {string}
* @memberof IConfig
* @defaultValue null
*/
sdkExtension?: string;
/**
* @description Default is false. If true, the SDK will track all [Browser Link](https://docs.microsoft.com/en-us/aspnet/core/client-side/using-browserlink) requests.
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
isBrowserLinkTrackingEnabled?: boolean;
/**
* @description AppId is used for the correlation between AJAX dependencies happening on the client-side with the server-side requets. When Beacon API is enabled, it cannot be used automatically, but can be set manually in the configuration. Default is null
* @type {string}
* @memberof IConfig
* @defaultValue null
*/
appId?: string;
/**
* @description If true, the SDK will add two headers ('Request-Id' and 'Request-Context') to all CORS requests tocorrelate outgoing AJAX dependencies with corresponding requests on the server side. Default is false
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
enableCorsCorrelation?: boolean;
enableOldTags?: boolean;
// Internal
/**
* @ignore
* @description Internal only
* @type {boolean}
* @memberof IConfig
*/
autoExceptionInstrumented?: boolean;
consoleLoggingLevel?: number;
telemetryLoggingLevel?: number;
diagnosticLogInterval?: number;
}

@@ -44,0 +264,0 @@

import { IConfiguration } from '@microsoft/applicationinsights-core-js';
/**
* @description Configuration settings for how telemetry is sent
* @export
* @interface IConfig
*/
export interface IConfig {
/**
* @description
* @type {boolean}
* @memberof IConfig
*/
emitLineDelimitedJson?: boolean;
/**
* @description An optional account id, if your app groups users into accounts. No spaces, commas, semicolons, equals, or vertical bars.
* @type {string}
* @memberof IConfig
*/
accountId?: string;
/**
* @description A session is logged if the user is inactive for this amount of time in milliseconds. Default 30 mins.
* @type {number}
* @memberof IConfig
* @default 30*1000
*/
sessionRenewalMs?: number;
/**
* @description A session is logged if it has continued for this amount of time in milliseconds. Default 24h.
* @type {number}
* @memberof IConfig
* @default 24*60*60*1000
*/
sessionExpirationMs?: number;
/**
* @description Max size of telemetry batch. If batch exceeds limit, it is sent and a new batch is started
* @type {number}
* @memberof IConfig
* @default 100000
*/
maxBatchSizeInBytes?: number;
/**
* @description How long to batch telemetry for before sending (milliseconds)
* @type {number}
* @memberof IConfig
* @default 15 seconds
*/
maxBatchInterval?: number;
/**
* @description If true, debugging data is thrown as an exception by the logger. Default false
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
enableDebug?: boolean;
/**
* @description If true, exceptions are not autocollected. Default is false
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
disableExceptionTracking?: boolean;
/**
* @description If true, telemetry is not collected or sent. Default is false
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
disableTelemetry?: boolean;
consoleLoggingLevel?: number;
telemetryLoggingLevel?: number;
diagnosticLogInterval?: number;
/**
* @description Percentage of events that will be sent. Default is 100, meaning all events are sent.
* @type {number}
* @memberof IConfig
* @defaultValue 100
*/
samplingPercentage?: number;
/**
* @description
* @type {boolean}
* @memberof IConfig
*/
autoTrackPageVisitTime?: boolean;
/**
* @description If true, Ajax calls are not autocollected. Default is false
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
disableAjaxTracking?: boolean;
/**
* @description If true, Fetch requests are not autocollected. Default is true.
* @type {boolean}
* @memberof IConfig
* @defaultValue true
*/
disableFetchTracking?: boolean;
/**
* @description If true, default behavior of trackPageView is changed to record end of page view duration interval when trackPageView is called. If false and no custom duration is provided to trackPageView, the page view performance is calculated using the navigation timing API. Default is false
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
overridePageViewDuration?: boolean;
/**
* @description Default 500 - controls how many ajax calls will be monitored per page view. Set to -1 to monitor all (unlimited) ajax calls on the page.
* @type {number}
* @memberof IConfig
*/
maxAjaxCallsPerView?: number;
/**
* @ignore
* @description If false, internal telemetry sender buffers will be checked at startup for items not yet sent. Default is true
* @type {boolean}
* @memberof IConfig
* @defaultValue true
*/
disableDataLossAnalysis?: boolean;
/**
* @description If false, the SDK will add two headers ('Request-Id' and 'Request-Context') to all dependency requests to correlate them with corresponding requests on the server side. Default is false.
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
disableCorrelationHeaders?: boolean;
/**
* @description Disable correlation headers for specific domain
* @type {string[]}
* @memberof IConfig
*/
correlationHeaderExcludedDomains?: string[];
/**
* @description Default false. If true, flush method will not be called when onBeforeUnload event triggers.
* @type {boolean}
* @memberof IConfig
*/
disableFlushOnBeforeUnload?: boolean;
/**
* @description If true, the buffer with all unsent telemetry is stored in session storage. The buffer is restored on page load. Default is true.
* @type {boolean}
* @memberof IConfig
* @defaultValue true
*/
enableSessionStorageBuffer?: boolean;
/**
* @description If true, the SDK will not store or read any data from cookies. Default is false.
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
isCookieUseDisabled?: boolean;
/**
* @description Custom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains.
* @type {string}
* @memberof IConfig
* @defaultValue ""
*/
cookieDomain?: string;
/** Default false. If false, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error), 503 (service unavailable), and 0 (offline, only if detected)
* @description
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
isRetryDisabled?: boolean;
/**
* @deprecated Used when initizialing from snippet only.
* @description The url from where the JS SDK will be downloaded. Default 'https://az416426.vo.msecnd.net/scripts/beta/ai.1.js'
* @type {string}
* @memberof IConfig
* @defaultValue "https://az416426.vo.msecnd.net/scripts/beta/ai.1.js"
*/
url?: string;
/**
* @description If true, the SDK will not store or read any data from local and session storage. Default is false.
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
isStorageUseDisabled?: boolean;
/**
* @description If false, the SDK will send all telemetry using the [Beacon API](https://www.w3.org/TR/beacon)
* @type {boolean}
* @memberof IConfig
* @defaultValue true
*/
isBeaconApiDisabled?: boolean;
/**
* @description Sets the sdk extension name. Only alphabetic characters are allowed. The extension name is added as a prefix to the 'ai.internal.sdkVersion' tag (e.g. 'ext_javascript:2.0.0'). Default is null.
* @type {string}
* @memberof IConfig
* @defaultValue null
*/
sdkExtension?: string;
/**
* @description Default is false. If true, the SDK will track all [Browser Link](https://docs.microsoft.com/en-us/aspnet/core/client-side/using-browserlink) requests.
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
isBrowserLinkTrackingEnabled?: boolean;
/**
* @description AppId is used for the correlation between AJAX dependencies happening on the client-side with the server-side requets. When Beacon API is enabled, it cannot be used automatically, but can be set manually in the configuration. Default is null
* @type {string}
* @memberof IConfig
* @defaultValue null
*/
appId?: string;
/**
* @description If true, the SDK will add two headers ('Request-Id' and 'Request-Context') to all CORS requests tocorrelate outgoing AJAX dependencies with corresponding requests on the server side. Default is false
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
enableCorsCorrelation?: boolean;
enableOldTags?: boolean;
/**
* @ignore
* @description Internal only
* @type {boolean}
* @memberof IConfig
*/
autoExceptionInstrumented?: boolean;
consoleLoggingLevel?: number;
telemetryLoggingLevel?: number;
diagnosticLogInterval?: number;
}

@@ -39,0 +226,0 @@ export declare class ConfigurationManager {

Sorry, the diff of this file is too big to display

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 too big to display

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