@microsoft/applicationinsights-core-js 2.7.0-beta.1 → 2.7.1-nightly.202110-04
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +110 -17
- package/browser/applicationinsights-core-js.js.map +1 -1
- package/browser/applicationinsights-core-js.min.js +2 -2
- package/browser/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.api.json +182 -1
- package/dist/applicationinsights-core-js.api.md +15 -0
- package/dist/applicationinsights-core-js.d.ts +27 -1
- package/dist/applicationinsights-core-js.js +110 -17
- package/dist/applicationinsights-core-js.js.map +1 -1
- package/dist/applicationinsights-core-js.min.js +2 -2
- package/dist/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.rollup.d.ts +27 -1
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +21 -3
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +3 -3
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +2 -2
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +1 -2
- package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
- package/dist-esm/JavaScriptSDK/Constants.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +2 -2
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +86 -3
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +27 -17
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -2
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +2 -2
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js +4 -3
- package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -2
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
- package/dist-esm/applicationinsights-core-js.js +2 -2
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +70 -70
- package/src/JavaScriptSDK/AppInsightsCore.ts +27 -6
- package/src/JavaScriptSDK/BaseCore.ts +3 -3
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +4 -4
- package/src/JavaScriptSDK/ChannelController.ts +3 -3
- package/src/JavaScriptSDK/CookieMgr.ts +6 -6
- package/src/JavaScriptSDK/CoreUtils.ts +20 -20
- package/src/JavaScriptSDK/DiagnosticLogger.ts +1 -2
- package/src/JavaScriptSDK/EnvUtils.ts +115 -21
- package/src/JavaScriptSDK/HelperFuncs.ts +41 -29
- package/src/JavaScriptSDK/InstrumentHooks.ts +1 -1
- package/src/JavaScriptSDK/NotificationManager.ts +1 -1
- package/src/JavaScriptSDK/PerfManager.ts +8 -8
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +1 -1
- package/src/JavaScriptSDK/RandomHelper.ts +1 -1
- package/src/JavaScriptSDK/TelemetryHelpers.ts +4 -4
- package/src/JavaScriptSDK/TelemetryPluginChain.ts +4 -3
- package/src/JavaScriptSDK.Enums/EventsDiscardedReason.ts +1 -1
- package/src/JavaScriptSDK.Enums/SendRequestReason.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts +3 -1
- package/src/JavaScriptSDK.Interfaces/IChannelControls.ts +2 -2
- package/src/JavaScriptSDK.Interfaces/IConfiguration.ts +6 -6
- package/src/JavaScriptSDK.Interfaces/ICookieMgr.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/IInstrumentHooks.ts +2 -2
- package/src/JavaScriptSDK.Interfaces/INotificationListener.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/INotificationManager.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/IPerfEvent.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/IPerfManager.ts +2 -2
- package/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/ITelemetryItem.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +4 -4
- package/src/JavaScriptSDK.Interfaces/ITelemetryPluginChain.ts +1 -1
- package/types/JavaScriptSDK/AppInsightsCore.d.ts +4 -0
- package/types/JavaScriptSDK/EnvUtils.d.ts +17 -0
- package/types/JavaScriptSDK.Interfaces/IAppInsightsCore.d.ts +1 -0
- package/types/applicationinsights-core-js.d.ts +1 -1
- package/types/tsdoc-metadata.json +1 -1
|
@@ -33,7 +33,7 @@ export interface INotificationListener {
|
|
|
33
33
|
/**
|
|
34
34
|
* [Optional] This event is sent if you have enabled perf events, they are primarily used to track internal performance testing and debugging
|
|
35
35
|
* the event can be displayed via the debug plugin extension.
|
|
36
|
-
* @param perfEvent
|
|
36
|
+
* @param perfEvent
|
|
37
37
|
*/
|
|
38
38
|
perfEvent?: (perfEvent: IPerfEvent) => void;
|
|
39
39
|
}
|
|
@@ -46,7 +46,7 @@ export interface INotificationManager {
|
|
|
46
46
|
/**
|
|
47
47
|
* [Optional] This event is sent if you have enabled perf events, they are primarily used to track internal performance testing and debugging
|
|
48
48
|
* the event can be displayed via the debug plugin extension.
|
|
49
|
-
* @param perfEvent
|
|
49
|
+
* @param perfEvent
|
|
50
50
|
*/
|
|
51
51
|
perfEvent?(perfEvent: IPerfEvent): void;
|
|
52
52
|
}
|
|
@@ -28,7 +28,7 @@ export interface IPerfEvent {
|
|
|
28
28
|
isAsync: boolean;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Identifies the total inclusive time spent for this event, including the time spent for child events,
|
|
31
|
+
* Identifies the total inclusive time spent for this event, including the time spent for child events,
|
|
32
32
|
* this will be undefined until the event is completed
|
|
33
33
|
*/
|
|
34
34
|
time?: number;
|
|
@@ -25,9 +25,9 @@ export interface IPerfManagerProvider {
|
|
|
25
25
|
*/
|
|
26
26
|
export interface IPerfManager {
|
|
27
27
|
/**
|
|
28
|
-
* Create a new event and start timing, the manager may return null/undefined to indicate that it does not
|
|
28
|
+
* Create a new event and start timing, the manager may return null/undefined to indicate that it does not
|
|
29
29
|
* want to monitor this source event.
|
|
30
|
-
* @param src The source name of the event
|
|
30
|
+
* @param src The source name of the event
|
|
31
31
|
* @param payloadDetails - An optional callback function to fetch the payload details for the event.
|
|
32
32
|
* @param isAsync - Is the event occurring from a async event
|
|
33
33
|
*/
|
|
@@ -69,7 +69,7 @@ export interface IProcessTelemetryContext {
|
|
|
69
69
|
* Create a new context using the core and config from the current instance
|
|
70
70
|
* @param plugins - The execution order to process the plugins, if null or not supplied
|
|
71
71
|
* then the current execution order will be copied.
|
|
72
|
-
* @param startAt - The plugin to start processing from, if missing from the execution
|
|
72
|
+
* @param startAt - The plugin to start processing from, if missing from the execution
|
|
73
73
|
* order then the next plugin will be NOT set.
|
|
74
74
|
*/
|
|
75
75
|
createNew: (plugins?:IPlugin[]|ITelemetryPluginChain, startAt?:IPlugin) => IProcessTelemetryContext;
|
|
@@ -15,15 +15,15 @@ export interface ITelemetryPlugin extends IPlugin {
|
|
|
15
15
|
/**
|
|
16
16
|
* Call back for telemetry processing before it it is sent
|
|
17
17
|
* @param env - This is the current event being reported
|
|
18
|
-
* @param itemCtx - This is the context for the current request, ITelemetryPlugin instances
|
|
18
|
+
* @param itemCtx - This is the context for the current request, ITelemetryPlugin instances
|
|
19
19
|
* can optionally use this to access the current core instance or define / pass additional information
|
|
20
20
|
* to later plugins (vs appending items to the telemetry item)
|
|
21
21
|
*/
|
|
22
22
|
processTelemetry: (env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => void;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Set next extension for telemetry processing, this is not optional as plugins should use the
|
|
26
|
-
* processNext() function of the passed IProcessTelemetryContext instead. It is being kept for
|
|
25
|
+
* Set next extension for telemetry processing, this is not optional as plugins should use the
|
|
26
|
+
* processNext() function of the passed IProcessTelemetryContext instead. It is being kept for
|
|
27
27
|
* now for backward compatibility only.
|
|
28
28
|
*/
|
|
29
29
|
setNextPlugin?: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
|
|
@@ -40,7 +40,7 @@ export interface IPlugin {
|
|
|
40
40
|
* @param config - The config for the plugin to use
|
|
41
41
|
* @param core - The current App Insights core to use for initializing this plugin instance
|
|
42
42
|
* @param extensions - The complete set of extensions to be used for initializing the plugin
|
|
43
|
-
* @param pluginChain - [Optional] specifies the current plugin chain which identifies the
|
|
43
|
+
* @param pluginChain - [Optional] specifies the current plugin chain which identifies the
|
|
44
44
|
* set of plugins and the order they should be executed for the current request.
|
|
45
45
|
*/
|
|
46
46
|
initialize: (config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?:ITelemetryPluginChain) => void;
|
|
@@ -24,7 +24,7 @@ export interface ITelemetryPluginChain {
|
|
|
24
24
|
/**
|
|
25
25
|
* Call back for telemetry processing before it it is sent
|
|
26
26
|
* @param env - This is the current event being reported
|
|
27
|
-
* @param itemCtx - This is the context for the current request, ITelemetryPlugin instances
|
|
27
|
+
* @param itemCtx - This is the context for the current request, ITelemetryPlugin instances
|
|
28
28
|
* can optionally use this to access the current core instance or define / pass additional information
|
|
29
29
|
* to later plugins (vs appending items to the telemetry item)
|
|
30
30
|
*/
|
|
@@ -26,4 +26,8 @@ export declare class AppInsightsCore extends BaseCore implements IAppInsightsCor
|
|
|
26
26
|
* Periodically check logger.queue for
|
|
27
27
|
*/
|
|
28
28
|
pollInternalLogs(eventName?: string): number;
|
|
29
|
+
/**
|
|
30
|
+
* Periodically check logger.queue for
|
|
31
|
+
*/
|
|
32
|
+
stopPollingInternalLogs(): void;
|
|
29
33
|
}
|
|
@@ -123,3 +123,20 @@ export declare function getIEVersion(userAgentStr?: string): number;
|
|
|
123
123
|
*/
|
|
124
124
|
export declare function dumpObj(object: any): string;
|
|
125
125
|
export declare function isSafari(userAgentStr?: string): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Checks if HTML5 Beacons are supported in the current environment.
|
|
128
|
+
* @returns True if supported, false otherwise.
|
|
129
|
+
*/
|
|
130
|
+
export declare function isBeaconsSupported(): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Checks if the Fetch API is supported in the current environment.
|
|
133
|
+
* @param withKeepAlive - [Optional] If True, check if fetch is available and it supports the keepalive feature, otherwise only check if fetch is supported
|
|
134
|
+
* @returns True if supported, otherwise false
|
|
135
|
+
*/
|
|
136
|
+
export declare function isFetchSupported(withKeepAlive?: boolean): boolean;
|
|
137
|
+
export declare function useXDomainRequest(): boolean | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* Checks if XMLHttpRequest is supported
|
|
140
|
+
* @returns True if supported, otherwise false
|
|
141
|
+
*/
|
|
142
|
+
export declare function isXhrSupported(): boolean;
|
|
@@ -44,6 +44,7 @@ export interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
44
44
|
*/
|
|
45
45
|
removeNotificationListener?(listener: INotificationListener): void;
|
|
46
46
|
pollInternalLogs?(eventName?: string): number;
|
|
47
|
+
stopPollingInternalLogs?(): void;
|
|
47
48
|
/**
|
|
48
49
|
* Return a new instance of the IProcessTelemetryContext for processing events
|
|
49
50
|
*/
|
|
@@ -16,7 +16,7 @@ export { BaseTelemetryPlugin } from './JavaScriptSDK/BaseTelemetryPlugin';
|
|
|
16
16
|
export { randomValue, random32, mwcRandomSeed, mwcRandom32 } from './JavaScriptSDK/RandomHelper';
|
|
17
17
|
export { CoreUtils, ICoreUtils, EventHelper, IEventHelper, Undefined, addEventHandler, newGuid, perfNow, newId, generateW3CId, disableCookies, canUseCookies, getCookie, setCookie, deleteCookie, _legacyCookieMgr } from "./JavaScriptSDK/CoreUtils";
|
|
18
18
|
export { isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, attachEvent, detachEvent, normalizeJsName, objForEachKey, strEndsWith, strStartsWith, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, strTrim, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, strContains, isSymbol, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objFreeze, objSeal } from './JavaScriptSDK/HelperFuncs';
|
|
19
|
-
export { getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto, hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, dumpObj, isIE, getIEVersion, isSafari, setEnableEnvMocks } from "./JavaScriptSDK/EnvUtils";
|
|
19
|
+
export { getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto, hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, dumpObj, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported } from "./JavaScriptSDK/EnvUtils";
|
|
20
20
|
export { getGlobal, objCreateFn as objCreate, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from '@microsoft/applicationinsights-shims';
|
|
21
21
|
export { NotificationManager } from "./JavaScriptSDK/NotificationManager";
|
|
22
22
|
export { INotificationManager } from "./JavaScriptSDK.Interfaces/INotificationManager";
|