@microsoft/applicationinsights-core-js 2.8.0-nightly.2202-06 → 2.8.0-nightly.2204-06
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 +2440 -1199
- 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 +16710 -8876
- package/dist/applicationinsights-core-js.api.md +465 -140
- package/dist/applicationinsights-core-js.d.ts +856 -217
- package/dist/applicationinsights-core-js.js +2440 -1199
- 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 +856 -217
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +4 -72
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +496 -99
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +120 -21
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +202 -87
- package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
- package/dist-esm/JavaScriptSDK/Constants.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +4 -4
- package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +7 -148
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +93 -0
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -0
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +45 -12
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +13 -12
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +477 -0
- package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -0
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +80 -86
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +3 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +28 -0
- package/dist-esm/JavaScriptSDK/InternalConstants.js.map +1 -0
- package/dist-esm/JavaScriptSDK/NotificationManager.js +37 -42
- package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +430 -119
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +30 -4
- package/dist-esm/JavaScriptSDK/RandomHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +60 -14
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +81 -0
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +1 -0
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +33 -0
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js.map +1 -0
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +51 -0
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js.map +1 -0
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +10 -9
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +90 -96
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +8 -0
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js.map +1 -0
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +8 -0
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js.map +1 -0
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -2
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js.map +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/IDbgExtension.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/ITelemetryInitializers.js +6 -0
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js.map +1 -0
- 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 -2
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +8 -0
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js.map +1 -0
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +8 -0
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js.map +1 -0
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +6 -0
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js.map +1 -0
- package/dist-esm/applicationinsights-core-js.js +13 -7
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +2 -2
- package/src/JavaScriptSDK/AppInsightsCore.ts +4 -105
- package/src/JavaScriptSDK/BaseCore.ts +696 -120
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +205 -31
- package/src/JavaScriptSDK/ChannelController.ts +242 -103
- package/src/JavaScriptSDK/CookieMgr.ts +7 -5
- package/src/JavaScriptSDK/CoreUtils.ts +8 -172
- package/src/JavaScriptSDK/DataCacheHelper.ts +106 -0
- package/src/JavaScriptSDK/DiagnosticLogger.ts +49 -12
- package/src/JavaScriptSDK/EnvUtils.ts +13 -12
- package/src/JavaScriptSDK/EventHelpers.ts +550 -0
- package/src/JavaScriptSDK/HelperFuncs.ts +114 -97
- package/src/JavaScriptSDK/InstrumentHooks.ts +4 -2
- package/src/JavaScriptSDK/InternalConstants.ts +26 -0
- package/src/JavaScriptSDK/NotificationManager.ts +34 -37
- package/src/JavaScriptSDK/PerfManager.ts +4 -7
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +543 -134
- package/src/JavaScriptSDK/RandomHelper.ts +35 -3
- package/src/JavaScriptSDK/TelemetryHelpers.ts +83 -21
- package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +111 -0
- package/src/JavaScriptSDK/UnloadHandlerContainer.ts +46 -0
- package/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts +56 -0
- package/src/JavaScriptSDK.Enums/EventsDiscardedReason.ts +48 -8
- package/src/JavaScriptSDK.Enums/LoggingEnums.ts +183 -87
- package/src/JavaScriptSDK.Enums/SendRequestReason.ts +5 -0
- package/src/JavaScriptSDK.Enums/TelemetryUnloadReason.ts +27 -0
- package/src/JavaScriptSDK.Enums/TelemetryUpdateReason.ts +27 -0
- package/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts +82 -2
- package/src/JavaScriptSDK.Interfaces/IChannelControls.ts +16 -5
- package/src/JavaScriptSDK.Interfaces/IInstrumentHooks.ts +16 -6
- package/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts +94 -14
- package/src/JavaScriptSDK.Interfaces/ITelemetryInitializers.ts +16 -0
- package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +28 -10
- package/src/JavaScriptSDK.Interfaces/ITelemetryPluginChain.ts +9 -11
- package/src/JavaScriptSDK.Interfaces/ITelemetryUnloadState.ts +10 -0
- package/src/JavaScriptSDK.Interfaces/ITelemetryUpdateState.ts +34 -0
- package/src/JavaScriptSDK.Interfaces/IUnloadableComponent.ts +17 -0
- package/types/JavaScriptSDK/AppInsightsCore.d.ts +0 -21
- package/types/JavaScriptSDK/BaseCore.d.ts +81 -3
- package/types/JavaScriptSDK/BaseTelemetryPlugin.d.ts +53 -10
- package/types/JavaScriptSDK/ChannelController.d.ts +16 -17
- package/types/JavaScriptSDK/CoreUtils.d.ts +1 -48
- package/types/JavaScriptSDK/DataCacheHelper.d.ts +13 -0
- package/types/JavaScriptSDK/DiagnosticLogger.d.ts +23 -0
- package/types/JavaScriptSDK/EventHelpers.d.ts +154 -0
- package/types/JavaScriptSDK/HelperFuncs.d.ts +37 -32
- package/types/JavaScriptSDK/InternalConstants.d.ts +20 -0
- package/types/JavaScriptSDK/PerfManager.d.ts +1 -1
- package/types/JavaScriptSDK/ProcessTelemetryContext.d.ts +69 -6
- package/types/JavaScriptSDK/RandomHelper.d.ts +6 -0
- package/types/JavaScriptSDK/TelemetryHelpers.d.ts +23 -3
- package/types/JavaScriptSDK/TelemetryInitializerPlugin.d.ts +16 -0
- package/types/JavaScriptSDK/UnloadHandlerContainer.d.ts +11 -0
- package/types/JavaScriptSDK.Enums/EnumHelperFuncs.d.ts +34 -0
- package/types/JavaScriptSDK.Enums/EventsDiscardedReason.d.ts +14 -9
- package/types/JavaScriptSDK.Enums/LoggingEnums.d.ts +89 -86
- package/types/JavaScriptSDK.Enums/SendRequestReason.d.ts +4 -0
- package/types/JavaScriptSDK.Enums/TelemetryUnloadReason.d.ts +21 -0
- package/types/JavaScriptSDK.Enums/TelemetryUpdateReason.d.ts +20 -0
- package/types/JavaScriptSDK.Interfaces/IAppInsightsCore.d.ts +72 -1
- package/types/JavaScriptSDK.Interfaces/IChannelControls.d.ts +16 -5
- package/types/JavaScriptSDK.Interfaces/IInstrumentHooks.d.ts +9 -0
- package/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext.d.ts +82 -11
- package/types/JavaScriptSDK.Interfaces/ITelemetryInitializers.d.ts +13 -0
- package/types/JavaScriptSDK.Interfaces/ITelemetryPlugin.d.ts +25 -8
- package/types/JavaScriptSDK.Interfaces/ITelemetryPluginChain.d.ts +9 -10
- package/types/JavaScriptSDK.Interfaces/ITelemetryUnloadState.d.ts +6 -0
- package/types/JavaScriptSDK.Interfaces/ITelemetryUpdateState.d.ts +22 -0
- package/types/JavaScriptSDK.Interfaces/IUnloadableComponent.d.ts +13 -0
- package/types/applicationinsights-core-js.d.ts +20 -10
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js +0 -76
- package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js.map +0 -1
- package/src/JavaScriptSDK/TelemetryPluginChain.ts +0 -120
- package/types/JavaScriptSDK/TelemetryPluginChain.d.ts +0 -32
|
@@ -12,29 +12,28 @@ import { strShimPrototype as strPrototype } from '@microsoft/applicationinsights
|
|
|
12
12
|
import { strShimUndefined as strUndefined } from '@microsoft/applicationinsights-shims';
|
|
13
13
|
|
|
14
14
|
// @public
|
|
15
|
-
export function
|
|
15
|
+
export function __getRegisteredEvents(target: any, eventName?: string, evtNamespace?: string | string[]): _IRegisteredEvents[];
|
|
16
16
|
|
|
17
17
|
// @public
|
|
18
|
-
export function
|
|
18
|
+
export function addEventHandler(eventName: string, callback: any, evtNamespace?: string | string[] | null): boolean;
|
|
19
19
|
|
|
20
20
|
// @public
|
|
21
|
-
export function
|
|
21
|
+
export function addEventListeners(events: string[], listener: any, excludeEvents?: string[], evtNamespace?: string | string[]): boolean;
|
|
22
22
|
|
|
23
23
|
// @public
|
|
24
|
-
export function
|
|
24
|
+
export function addPageHideEventListener(listener: any, excludeEvents?: string[] | null, evtNamespace?: string | string[] | null): boolean;
|
|
25
25
|
|
|
26
26
|
// @public
|
|
27
|
-
export function
|
|
27
|
+
export function addPageShowEventListener(listener: any, excludeEvents?: string[] | null, evtNamespace?: string | string[] | null): boolean;
|
|
28
|
+
|
|
29
|
+
// @public
|
|
30
|
+
export function addPageUnloadEventListener(listener: any, excludeEvents?: string[], evtNamespace?: string | string[]): boolean;
|
|
28
31
|
|
|
29
32
|
// @public (undocumented)
|
|
30
33
|
export class AppInsightsCore extends BaseCore implements IAppInsightsCore {
|
|
31
34
|
constructor();
|
|
32
|
-
addNotificationListener(listener: INotificationListener): void;
|
|
33
35
|
// (undocumented)
|
|
34
36
|
initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
|
|
35
|
-
pollInternalLogs(eventName?: string): number;
|
|
36
|
-
removeNotificationListener(listener: INotificationListener): void;
|
|
37
|
-
stopPollingInternalLogs(): void;
|
|
38
37
|
// (undocumented)
|
|
39
38
|
track(telemetryItem: ITelemetryItem): void;
|
|
40
39
|
}
|
|
@@ -43,7 +42,7 @@ export class AppInsightsCore extends BaseCore implements IAppInsightsCore {
|
|
|
43
42
|
export function areCookiesSupported(logger?: IDiagnosticLogger): any;
|
|
44
43
|
|
|
45
44
|
// @public
|
|
46
|
-
export function arrForEach<T>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => void | number, thisArg?: any): void;
|
|
45
|
+
export function arrForEach<T = any>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => undefined | void | number, thisArg?: any): void;
|
|
47
46
|
|
|
48
47
|
// @public
|
|
49
48
|
export function arrIndexOf<T>(arr: T[], searchElement: T, fromIndex?: number): number;
|
|
@@ -60,20 +59,28 @@ export function attachEvent(obj: any, eventNameWithoutOn: string, handlerRef: an
|
|
|
60
59
|
// @public (undocumented)
|
|
61
60
|
export class BaseCore implements IAppInsightsCore {
|
|
62
61
|
constructor();
|
|
62
|
+
addNotificationListener(listener: INotificationListener): void;
|
|
63
|
+
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
|
|
64
|
+
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
|
|
65
|
+
addUnloadCb(handler: UnloadHandler): void;
|
|
63
66
|
// (undocumented)
|
|
64
67
|
config: IConfiguration;
|
|
65
68
|
// (undocumented)
|
|
66
69
|
static defaultConfig: IConfiguration;
|
|
67
70
|
// (undocumented)
|
|
68
71
|
eventCnt(): number;
|
|
72
|
+
evtNamespace(): string;
|
|
69
73
|
// (undocumented)
|
|
70
74
|
_extensions: IPlugin[];
|
|
75
|
+
flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): void;
|
|
71
76
|
getCookieMgr(): ICookieMgr;
|
|
72
77
|
// (undocumented)
|
|
73
78
|
getNotifyMgr(): INotificationManager;
|
|
74
79
|
// (undocumented)
|
|
75
80
|
getPerfMgr(): IPerfManager;
|
|
76
81
|
// (undocumented)
|
|
82
|
+
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
83
|
+
// (undocumented)
|
|
77
84
|
getProcessTelContext(): IProcessTelemetryContext;
|
|
78
85
|
// (undocumented)
|
|
79
86
|
getTransmissionControls(): IChannelControls[][];
|
|
@@ -83,20 +90,29 @@ export class BaseCore implements IAppInsightsCore {
|
|
|
83
90
|
isInitialized: () => boolean;
|
|
84
91
|
// (undocumented)
|
|
85
92
|
logger: IDiagnosticLogger;
|
|
93
|
+
pollInternalLogs(eventName?: string): number;
|
|
86
94
|
// (undocumented)
|
|
87
95
|
protected releaseQueue(): void;
|
|
96
|
+
removeNotificationListener(listener: INotificationListener): void;
|
|
88
97
|
setCookieMgr(cookieMgr: ICookieMgr): void;
|
|
89
98
|
// (undocumented)
|
|
90
99
|
setPerfMgr(perfMgr: IPerfManager): void;
|
|
100
|
+
stopPollingInternalLogs(): void;
|
|
91
101
|
// (undocumented)
|
|
92
102
|
track(telemetryItem: ITelemetryItem): void;
|
|
103
|
+
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void;
|
|
104
|
+
protected _updateHook?(updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState): void | boolean;
|
|
93
105
|
}
|
|
94
106
|
|
|
95
107
|
// @public
|
|
96
108
|
export abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
|
|
97
109
|
constructor();
|
|
110
|
+
protected _addHook(hooks: IInstrumentHook | IInstrumentHook[]): void;
|
|
111
|
+
protected _addUnloadCb(handler: UnloadHandler): void;
|
|
98
112
|
core: IAppInsightsCore;
|
|
99
113
|
diagLog: (itemCtx?: IProcessTelemetryContext) => IDiagnosticLogger;
|
|
114
|
+
protected _doTeardown?: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void) => void | boolean;
|
|
115
|
+
protected _doUpdate?: (updateCtx?: IProcessTelemetryUpdateContext, updateState?: ITelemetryUpdateState, asyncCallback?: () => void) => void | boolean;
|
|
100
116
|
protected _getTelCtx: (currentCtx?: IProcessTelemetryContext) => IProcessTelemetryContext;
|
|
101
117
|
// (undocumented)
|
|
102
118
|
identifier: string;
|
|
@@ -110,6 +126,8 @@ export abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
|
|
|
110
126
|
abstract processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
111
127
|
protected setInitialized: (isInitialized: boolean) => void;
|
|
112
128
|
setNextPlugin: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
|
|
129
|
+
teardown(unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState): void | boolean;
|
|
130
|
+
update(updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState): void | boolean;
|
|
113
131
|
// (undocumented)
|
|
114
132
|
version?: string;
|
|
115
133
|
}
|
|
@@ -126,6 +144,33 @@ export function createClassFromInterface<T>(defaults?: T): new () => T;
|
|
|
126
144
|
// @public (undocumented)
|
|
127
145
|
export function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
128
146
|
|
|
147
|
+
// @public
|
|
148
|
+
export function createEnumMap<E, I = keyof E>(values: {
|
|
149
|
+
[key in keyof E]: E[keyof E];
|
|
150
|
+
}): EnumMap<E, I>;
|
|
151
|
+
|
|
152
|
+
// @public
|
|
153
|
+
export function createEnumStyle<E>(values: {
|
|
154
|
+
[key in keyof E]: E[keyof E];
|
|
155
|
+
}): EnumValue<E>;
|
|
156
|
+
|
|
157
|
+
// @public
|
|
158
|
+
export function createProcessTelemetryContext(telemetryChain: ITelemetryPluginChain | null, config: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin): IProcessTelemetryContext;
|
|
159
|
+
|
|
160
|
+
// @public (undocumented)
|
|
161
|
+
export function createUniqueNamespace(name: string, includeVersion?: boolean): string;
|
|
162
|
+
|
|
163
|
+
// @public (undocumented)
|
|
164
|
+
export function createUnloadHandlerContainer(): {
|
|
165
|
+
add: (handler: UnloadHandler) => void;
|
|
166
|
+
run: (unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
// @public
|
|
170
|
+
export function createValueMap<E, V = E>(values: {
|
|
171
|
+
[key in keyof E]: [eValue: E[keyof E], mapValue: V[keyof V]];
|
|
172
|
+
}): V;
|
|
173
|
+
|
|
129
174
|
// @public
|
|
130
175
|
export function dateNow(): number;
|
|
131
176
|
|
|
@@ -161,18 +206,214 @@ export function doPerf<T>(mgrSource: IPerfManagerProvider | IPerfManager, getSou
|
|
|
161
206
|
// @public
|
|
162
207
|
export function dumpObj(object: any): string;
|
|
163
208
|
|
|
209
|
+
// @public
|
|
210
|
+
export const enum eEventsDiscardedReason {
|
|
211
|
+
InvalidEvent = 2,
|
|
212
|
+
KillSwitch = 4,
|
|
213
|
+
NonRetryableStatus = 1,
|
|
214
|
+
QueueFull = 5,
|
|
215
|
+
SizeLimitExceeded = 3,
|
|
216
|
+
Unknown = 0
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// @public (undocumented)
|
|
220
|
+
export const enum _eInternalMessageId {
|
|
221
|
+
// (undocumented)
|
|
222
|
+
BrowserCannotReadLocalStorage = 1,
|
|
223
|
+
// (undocumented)
|
|
224
|
+
BrowserCannotReadSessionStorage = 2,
|
|
225
|
+
// (undocumented)
|
|
226
|
+
BrowserCannotWriteLocalStorage = 3,
|
|
227
|
+
// (undocumented)
|
|
228
|
+
BrowserCannotWriteSessionStorage = 4,
|
|
229
|
+
// (undocumented)
|
|
230
|
+
BrowserDoesNotSupportLocalStorage = 0,
|
|
231
|
+
// (undocumented)
|
|
232
|
+
BrowserFailedRemovalFromLocalStorage = 5,
|
|
233
|
+
// (undocumented)
|
|
234
|
+
BrowserFailedRemovalFromSessionStorage = 6,
|
|
235
|
+
// (undocumented)
|
|
236
|
+
CannotAccessCookie = 68,
|
|
237
|
+
// (undocumented)
|
|
238
|
+
CannotParseAiBlobValue = 101,
|
|
239
|
+
// (undocumented)
|
|
240
|
+
CannotSendEmptyTelemetry = 7,
|
|
241
|
+
// (undocumented)
|
|
242
|
+
CannotSerializeObject = 48,
|
|
243
|
+
// (undocumented)
|
|
244
|
+
CannotSerializeObjectNonSerializable = 49,
|
|
245
|
+
// (undocumented)
|
|
246
|
+
CircularReferenceDetected = 50,
|
|
247
|
+
// (undocumented)
|
|
248
|
+
ClearAuthContextFailed = 51,
|
|
249
|
+
// (undocumented)
|
|
250
|
+
ClientPerformanceMathError = 8,
|
|
251
|
+
// (undocumented)
|
|
252
|
+
CreateEnvelopeError = 47,
|
|
253
|
+
// (undocumented)
|
|
254
|
+
ErrorParsingAISessionCookie = 9,
|
|
255
|
+
// (undocumented)
|
|
256
|
+
ErrorPVCalc = 10,
|
|
257
|
+
// (undocumented)
|
|
258
|
+
ExceptionTruncated = 52,
|
|
259
|
+
// (undocumented)
|
|
260
|
+
ExceptionWhileLoggingError = 11,
|
|
261
|
+
// (undocumented)
|
|
262
|
+
FailedAddingCustomDefinedRequestContext = 104,
|
|
263
|
+
// (undocumented)
|
|
264
|
+
FailedAddingTelemetryToBuffer = 12,
|
|
265
|
+
// (undocumented)
|
|
266
|
+
FailedMonitorAjaxAbort = 13,
|
|
267
|
+
// (undocumented)
|
|
268
|
+
FailedMonitorAjaxDur = 14,
|
|
269
|
+
// (undocumented)
|
|
270
|
+
FailedMonitorAjaxGetCorrelationHeader = 18,
|
|
271
|
+
// (undocumented)
|
|
272
|
+
FailedMonitorAjaxOpen = 15,
|
|
273
|
+
// (undocumented)
|
|
274
|
+
FailedMonitorAjaxRSC = 16,
|
|
275
|
+
// (undocumented)
|
|
276
|
+
FailedMonitorAjaxSend = 17,
|
|
277
|
+
// (undocumented)
|
|
278
|
+
FailedMonitorAjaxSetRequestHeader = 71,
|
|
279
|
+
// (undocumented)
|
|
280
|
+
FailedToAddHandlerForOnBeforeUnload = 19,
|
|
281
|
+
// (undocumented)
|
|
282
|
+
FailedToFixDepricatedValues = 44,
|
|
283
|
+
// (undocumented)
|
|
284
|
+
FailedToReportDataLoss = 21,
|
|
285
|
+
// (undocumented)
|
|
286
|
+
FailedToRestoreStorageBuffer = 42,
|
|
287
|
+
// (undocumented)
|
|
288
|
+
FailedToSendQueuedTelemetry = 20,
|
|
289
|
+
// (undocumented)
|
|
290
|
+
FailedToSetStorageBuffer = 41,
|
|
291
|
+
// (undocumented)
|
|
292
|
+
FlushFailed = 22,
|
|
293
|
+
// (undocumented)
|
|
294
|
+
IdTooLong = 69,
|
|
295
|
+
// (undocumented)
|
|
296
|
+
IllegalCharsInName = 53,
|
|
297
|
+
// (undocumented)
|
|
298
|
+
InMemoryStorageBufferFull = 105,
|
|
299
|
+
// (undocumented)
|
|
300
|
+
InvalidBackendResponse = 43,
|
|
301
|
+
// (undocumented)
|
|
302
|
+
InvalidContentBlob = 102,
|
|
303
|
+
// (undocumented)
|
|
304
|
+
InvalidDurationValue = 45,
|
|
305
|
+
// (undocumented)
|
|
306
|
+
InvalidEvent = 70,
|
|
307
|
+
// (undocumented)
|
|
308
|
+
InvalidInstrumentationKey = 100,
|
|
309
|
+
// (undocumented)
|
|
310
|
+
ItemNotInArray = 54,
|
|
311
|
+
// (undocumented)
|
|
312
|
+
MaxAjaxPerPVExceeded = 55,
|
|
313
|
+
// (undocumented)
|
|
314
|
+
MessageLimitPerPVExceeded = 23,
|
|
315
|
+
// (undocumented)
|
|
316
|
+
MessageTruncated = 56,
|
|
317
|
+
// (undocumented)
|
|
318
|
+
MissingRequiredFieldSpecification = 24,
|
|
319
|
+
// (undocumented)
|
|
320
|
+
NameTooLong = 57,
|
|
321
|
+
// (undocumented)
|
|
322
|
+
NavigationTimingNotSupported = 25,
|
|
323
|
+
// (undocumented)
|
|
324
|
+
NotificationException = 74,
|
|
325
|
+
// (undocumented)
|
|
326
|
+
OnError = 26,
|
|
327
|
+
// (undocumented)
|
|
328
|
+
PluginException = 73,
|
|
329
|
+
// (undocumented)
|
|
330
|
+
SampleRateOutOfRange = 58,
|
|
331
|
+
// (undocumented)
|
|
332
|
+
SendBrowserInfoOnUserInit = 72,
|
|
333
|
+
// (undocumented)
|
|
334
|
+
SenderNotInitialized = 28,
|
|
335
|
+
// (undocumented)
|
|
336
|
+
SessionRenewalDateIsZero = 27,
|
|
337
|
+
// (undocumented)
|
|
338
|
+
SessionStorageBufferFull = 67,
|
|
339
|
+
// (undocumented)
|
|
340
|
+
SetAuthContextFailed = 59,
|
|
341
|
+
// (undocumented)
|
|
342
|
+
SetAuthContextFailedAccountName = 60,
|
|
343
|
+
// (undocumented)
|
|
344
|
+
SnippetScriptLoadFailure = 99,
|
|
345
|
+
// (undocumented)
|
|
346
|
+
StartCalledMoreThanOnce = 62,
|
|
347
|
+
// (undocumented)
|
|
348
|
+
StartTrackEventFailed = 29,
|
|
349
|
+
// (undocumented)
|
|
350
|
+
StartTrackFailed = 31,
|
|
351
|
+
// (undocumented)
|
|
352
|
+
StopCalledWithoutStart = 63,
|
|
353
|
+
// (undocumented)
|
|
354
|
+
StopTrackEventFailed = 30,
|
|
355
|
+
// (undocumented)
|
|
356
|
+
StopTrackFailed = 32,
|
|
357
|
+
// (undocumented)
|
|
358
|
+
StringValueTooLong = 61,
|
|
359
|
+
// (undocumented)
|
|
360
|
+
TelemetryEnvelopeInvalid = 46,
|
|
361
|
+
// (undocumented)
|
|
362
|
+
TelemetryInitializerFailed = 64,
|
|
363
|
+
// (undocumented)
|
|
364
|
+
TelemetrySampledAndNotSent = 33,
|
|
365
|
+
// (undocumented)
|
|
366
|
+
TrackArgumentsNotSpecified = 65,
|
|
367
|
+
// (undocumented)
|
|
368
|
+
TrackEventFailed = 34,
|
|
369
|
+
// (undocumented)
|
|
370
|
+
TrackExceptionFailed = 35,
|
|
371
|
+
// (undocumented)
|
|
372
|
+
TrackMetricFailed = 36,
|
|
373
|
+
// (undocumented)
|
|
374
|
+
TrackPageActionEventFailed = 103,
|
|
375
|
+
// (undocumented)
|
|
376
|
+
TrackPVFailed = 37,
|
|
377
|
+
// (undocumented)
|
|
378
|
+
TrackPVFailedCalc = 38,
|
|
379
|
+
// (undocumented)
|
|
380
|
+
TrackTraceFailed = 39,
|
|
381
|
+
// (undocumented)
|
|
382
|
+
TransmissionFailed = 40,
|
|
383
|
+
// (undocumented)
|
|
384
|
+
UrlTooLong = 66
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// @public (undocumented)
|
|
388
|
+
export const enum eLoggingSeverity {
|
|
389
|
+
CRITICAL = 1,
|
|
390
|
+
WARNING = 2
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// @public (undocumented)
|
|
394
|
+
export type EnumMap<E = any, I = E> = {
|
|
395
|
+
readonly [key in keyof E extends string ? keyof E : never]: key extends string ? key : keyof E;
|
|
396
|
+
} & I;
|
|
397
|
+
|
|
398
|
+
// @public (undocumented)
|
|
399
|
+
export type EnumValue<E = any> = {
|
|
400
|
+
readonly [key in keyof E]: E[key];
|
|
401
|
+
};
|
|
402
|
+
|
|
164
403
|
// @public (undocumented)
|
|
165
404
|
export const EventHelper: IEventHelper;
|
|
166
405
|
|
|
167
406
|
// @public
|
|
168
|
-
export
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
407
|
+
export function eventOff<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): void;
|
|
408
|
+
|
|
409
|
+
// @public
|
|
410
|
+
export function eventOn<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): boolean;
|
|
411
|
+
|
|
412
|
+
// @public
|
|
413
|
+
export const EventsDiscardedReason: EnumValue<typeof eEventsDiscardedReason>;
|
|
414
|
+
|
|
415
|
+
// @public (undocumented)
|
|
416
|
+
export type EventsDiscardedReason = number | eEventsDiscardedReason;
|
|
176
417
|
|
|
177
418
|
// @public
|
|
178
419
|
export function generateW3CId(): string;
|
|
@@ -198,6 +439,16 @@ export function getDocument(): Document | null;
|
|
|
198
439
|
// @public
|
|
199
440
|
export function getExceptionName(object: any): string;
|
|
200
441
|
|
|
442
|
+
// @public (undocumented)
|
|
443
|
+
export const enum GetExtCfgMergeType {
|
|
444
|
+
// (undocumented)
|
|
445
|
+
MergeDefaultFromRootOrDefault = 2,
|
|
446
|
+
// (undocumented)
|
|
447
|
+
MergeDefaultOnly = 1,
|
|
448
|
+
// (undocumented)
|
|
449
|
+
None = 0
|
|
450
|
+
}
|
|
451
|
+
|
|
201
452
|
// @public
|
|
202
453
|
export function getGblPerfMgr(): IPerfManager;
|
|
203
454
|
|
|
@@ -254,10 +505,16 @@ export function hasWindow(): boolean;
|
|
|
254
505
|
// @public (undocumented)
|
|
255
506
|
export interface IAppInsightsCore extends IPerfManagerProvider {
|
|
256
507
|
addNotificationListener?(listener: INotificationListener): void;
|
|
508
|
+
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
|
|
509
|
+
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
|
|
510
|
+
addUnloadCb(handler: UnloadHandler): void;
|
|
257
511
|
// (undocumented)
|
|
258
512
|
config: IConfiguration;
|
|
513
|
+
evtNamespace(): string;
|
|
514
|
+
flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason, cbTimeout?: number): boolean | void;
|
|
259
515
|
getCookieMgr(): ICookieMgr;
|
|
260
516
|
getNotifyMgr(): INotificationManager;
|
|
517
|
+
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
261
518
|
getProcessTelContext(): IProcessTelemetryContext;
|
|
262
519
|
// (undocumented)
|
|
263
520
|
getTransmissionControls(): IChannelControls[][];
|
|
@@ -274,14 +531,30 @@ export interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
274
531
|
stopPollingInternalLogs?(): void;
|
|
275
532
|
// (undocumented)
|
|
276
533
|
track(telemetryItem: ITelemetryItem): void;
|
|
534
|
+
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
// @public (undocumented)
|
|
538
|
+
export interface IBaseProcessingContext {
|
|
539
|
+
core: () => IAppInsightsCore;
|
|
540
|
+
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IBaseProcessingContext;
|
|
541
|
+
diagLog: () => IDiagnosticLogger;
|
|
542
|
+
getCfg: () => IConfiguration;
|
|
543
|
+
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean | string[] | RegExp[] | Function) => number | string | boolean | string[] | RegExp[] | Function;
|
|
544
|
+
getExtCfg: <T>(identifier: string, defaultValue?: T | any, mergeDefault?: GetExtCfgMergeType) => T;
|
|
545
|
+
getNext: () => ITelemetryPluginChain;
|
|
546
|
+
hasNext: () => boolean;
|
|
547
|
+
iterate: <T extends ITelemetryPlugin = ITelemetryPlugin>(callback: (plugin: T) => void) => void;
|
|
548
|
+
onComplete: (onComplete: () => void, that?: any, ...args: any[]) => void;
|
|
549
|
+
setNext: (nextCtx: ITelemetryPluginChain) => void;
|
|
277
550
|
}
|
|
278
551
|
|
|
279
552
|
// @public
|
|
280
553
|
export interface IChannelControls extends ITelemetryPlugin {
|
|
281
|
-
flush(async: boolean, callBack?: () => void): void;
|
|
554
|
+
flush(async: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): boolean | void;
|
|
282
555
|
pause(): void;
|
|
283
556
|
resume(): void;
|
|
284
|
-
teardown()
|
|
557
|
+
teardown: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
|
|
285
558
|
}
|
|
286
559
|
|
|
287
560
|
// @public
|
|
@@ -335,7 +608,7 @@ export interface ICookieMgrConfig {
|
|
|
335
608
|
|
|
336
609
|
// @public @deprecated
|
|
337
610
|
export interface ICoreUtils {
|
|
338
|
-
addEventHandler: (eventName: string, callback: any) => boolean;
|
|
611
|
+
addEventHandler: (eventName: string, callback: any, evtNamespace?: string | string[]) => boolean;
|
|
339
612
|
arrForEach: <T>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => void | number, thisArg?: any) => void;
|
|
340
613
|
arrIndexOf: <T>(arr: T[], searchElement: T, fromIndex?: number) => number;
|
|
341
614
|
arrMap: <T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any) => R[];
|
|
@@ -430,6 +703,7 @@ export interface IEventHelper {
|
|
|
430
703
|
export interface IInstrumentCallDetails {
|
|
431
704
|
ctx: () => any;
|
|
432
705
|
err?: Error;
|
|
706
|
+
evt?: Event;
|
|
433
707
|
// (undocumented)
|
|
434
708
|
inst: any;
|
|
435
709
|
// (undocumented)
|
|
@@ -461,12 +735,23 @@ export interface IInstrumentHooks {
|
|
|
461
735
|
export interface IInstrumentHooksCallbacks {
|
|
462
736
|
fnErr?: InstrumentorHooksCallback;
|
|
463
737
|
hkErr?: InstrumentorHooksCallback;
|
|
738
|
+
ns?: string | string[];
|
|
464
739
|
req?: InstrumentorHooksCallback;
|
|
465
740
|
rsp?: InstrumentorHooksCallback;
|
|
466
741
|
}
|
|
467
742
|
|
|
743
|
+
// @public (undocumented)
|
|
744
|
+
export interface ILoadedPlugin<T extends IPlugin> {
|
|
745
|
+
isEnabled: () => boolean;
|
|
746
|
+
// (undocumented)
|
|
747
|
+
plugin: T;
|
|
748
|
+
// (undocumented)
|
|
749
|
+
remove: (isAsync?: boolean, removeCb?: (removed?: boolean) => void) => void;
|
|
750
|
+
setEnabled: (isEnabled: boolean) => void;
|
|
751
|
+
}
|
|
752
|
+
|
|
468
753
|
// @public
|
|
469
|
-
export function initializePlugins(processContext:
|
|
754
|
+
export function initializePlugins(processContext: IProcessTelemetryContext, extensions: IPlugin[]): void;
|
|
470
755
|
|
|
471
756
|
// @public
|
|
472
757
|
export interface INotificationListener {
|
|
@@ -515,93 +800,10 @@ export class _InternalLogMessage {
|
|
|
515
800
|
}
|
|
516
801
|
|
|
517
802
|
// @public
|
|
518
|
-
export const _InternalMessageId:
|
|
519
|
-
BrowserDoesNotSupportLocalStorage: number;
|
|
520
|
-
BrowserCannotReadLocalStorage: number;
|
|
521
|
-
BrowserCannotReadSessionStorage: number;
|
|
522
|
-
BrowserCannotWriteLocalStorage: number;
|
|
523
|
-
BrowserCannotWriteSessionStorage: number;
|
|
524
|
-
BrowserFailedRemovalFromLocalStorage: number;
|
|
525
|
-
BrowserFailedRemovalFromSessionStorage: number;
|
|
526
|
-
CannotSendEmptyTelemetry: number;
|
|
527
|
-
ClientPerformanceMathError: number;
|
|
528
|
-
ErrorParsingAISessionCookie: number;
|
|
529
|
-
ErrorPVCalc: number;
|
|
530
|
-
ExceptionWhileLoggingError: number;
|
|
531
|
-
FailedAddingTelemetryToBuffer: number;
|
|
532
|
-
FailedMonitorAjaxAbort: number;
|
|
533
|
-
FailedMonitorAjaxDur: number;
|
|
534
|
-
FailedMonitorAjaxOpen: number;
|
|
535
|
-
FailedMonitorAjaxRSC: number;
|
|
536
|
-
FailedMonitorAjaxSend: number;
|
|
537
|
-
FailedMonitorAjaxGetCorrelationHeader: number;
|
|
538
|
-
FailedToAddHandlerForOnBeforeUnload: number;
|
|
539
|
-
FailedToSendQueuedTelemetry: number;
|
|
540
|
-
FailedToReportDataLoss: number;
|
|
541
|
-
FlushFailed: number;
|
|
542
|
-
MessageLimitPerPVExceeded: number;
|
|
543
|
-
MissingRequiredFieldSpecification: number;
|
|
544
|
-
NavigationTimingNotSupported: number;
|
|
545
|
-
OnError: number;
|
|
546
|
-
SessionRenewalDateIsZero: number;
|
|
547
|
-
SenderNotInitialized: number;
|
|
548
|
-
StartTrackEventFailed: number;
|
|
549
|
-
StopTrackEventFailed: number;
|
|
550
|
-
StartTrackFailed: number;
|
|
551
|
-
StopTrackFailed: number;
|
|
552
|
-
TelemetrySampledAndNotSent: number;
|
|
553
|
-
TrackEventFailed: number;
|
|
554
|
-
TrackExceptionFailed: number;
|
|
555
|
-
TrackMetricFailed: number;
|
|
556
|
-
TrackPVFailed: number;
|
|
557
|
-
TrackPVFailedCalc: number;
|
|
558
|
-
TrackTraceFailed: number;
|
|
559
|
-
TransmissionFailed: number;
|
|
560
|
-
FailedToSetStorageBuffer: number;
|
|
561
|
-
FailedToRestoreStorageBuffer: number;
|
|
562
|
-
InvalidBackendResponse: number;
|
|
563
|
-
FailedToFixDepricatedValues: number;
|
|
564
|
-
InvalidDurationValue: number;
|
|
565
|
-
TelemetryEnvelopeInvalid: number;
|
|
566
|
-
CreateEnvelopeError: number;
|
|
567
|
-
CannotSerializeObject: number;
|
|
568
|
-
CannotSerializeObjectNonSerializable: number;
|
|
569
|
-
CircularReferenceDetected: number;
|
|
570
|
-
ClearAuthContextFailed: number;
|
|
571
|
-
ExceptionTruncated: number;
|
|
572
|
-
IllegalCharsInName: number;
|
|
573
|
-
ItemNotInArray: number;
|
|
574
|
-
MaxAjaxPerPVExceeded: number;
|
|
575
|
-
MessageTruncated: number;
|
|
576
|
-
NameTooLong: number;
|
|
577
|
-
SampleRateOutOfRange: number;
|
|
578
|
-
SetAuthContextFailed: number;
|
|
579
|
-
SetAuthContextFailedAccountName: number;
|
|
580
|
-
StringValueTooLong: number;
|
|
581
|
-
StartCalledMoreThanOnce: number;
|
|
582
|
-
StopCalledWithoutStart: number;
|
|
583
|
-
TelemetryInitializerFailed: number;
|
|
584
|
-
TrackArgumentsNotSpecified: number;
|
|
585
|
-
UrlTooLong: number;
|
|
586
|
-
SessionStorageBufferFull: number;
|
|
587
|
-
CannotAccessCookie: number;
|
|
588
|
-
IdTooLong: number;
|
|
589
|
-
InvalidEvent: number;
|
|
590
|
-
FailedMonitorAjaxSetRequestHeader: number;
|
|
591
|
-
SendBrowserInfoOnUserInit: number;
|
|
592
|
-
PluginException: number;
|
|
593
|
-
NotificationException: number;
|
|
594
|
-
SnippetScriptLoadFailure: number;
|
|
595
|
-
InvalidInstrumentationKey: number;
|
|
596
|
-
CannotParseAiBlobValue: number;
|
|
597
|
-
InvalidContentBlob: number;
|
|
598
|
-
TrackPageActionEventFailed: number;
|
|
599
|
-
FailedAddingCustomDefinedRequestContext: number;
|
|
600
|
-
InMemoryStorageBufferFull: number;
|
|
601
|
-
};
|
|
803
|
+
export const _InternalMessageId: EnumValue<typeof _eInternalMessageId>;
|
|
602
804
|
|
|
603
805
|
// @public (undocumented)
|
|
604
|
-
export type _InternalMessageId = number |
|
|
806
|
+
export type _InternalMessageId = number | _eInternalMessageId;
|
|
605
807
|
|
|
606
808
|
// @public
|
|
607
809
|
export interface IPerfEvent {
|
|
@@ -638,22 +840,34 @@ export interface IPlugin {
|
|
|
638
840
|
readonly identifier: string;
|
|
639
841
|
initialize: (config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain) => void;
|
|
640
842
|
isInitialized?: () => boolean;
|
|
641
|
-
teardown?: () => void;
|
|
843
|
+
teardown?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
|
|
642
844
|
readonly version?: string;
|
|
643
845
|
}
|
|
644
846
|
|
|
645
847
|
// @public
|
|
646
|
-
export interface IProcessTelemetryContext {
|
|
647
|
-
core: () => IAppInsightsCore;
|
|
848
|
+
export interface IProcessTelemetryContext extends IBaseProcessingContext {
|
|
648
849
|
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryContext;
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
processNext: (
|
|
656
|
-
|
|
850
|
+
processNext: (env: ITelemetryItem) => boolean | void;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
// @public
|
|
854
|
+
export interface IProcessTelemetryUnloadContext extends IBaseProcessingContext {
|
|
855
|
+
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryUnloadContext;
|
|
856
|
+
processNext: (unloadState: ITelemetryUnloadState) => boolean | void;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
// @public
|
|
860
|
+
export interface IProcessTelemetryUpdateContext extends IBaseProcessingContext {
|
|
861
|
+
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryUpdateContext;
|
|
862
|
+
processNext: (updateState: ITelemetryUpdateState) => boolean | void;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
// @public (undocumented)
|
|
866
|
+
export interface _IRegisteredEvents {
|
|
867
|
+
// (undocumented)
|
|
868
|
+
handler: any;
|
|
869
|
+
// (undocumented)
|
|
870
|
+
name: string;
|
|
657
871
|
}
|
|
658
872
|
|
|
659
873
|
// @public
|
|
@@ -681,22 +895,22 @@ export function isFunction(value: any): value is Function;
|
|
|
681
895
|
export function isIE(): boolean;
|
|
682
896
|
|
|
683
897
|
// @public (undocumented)
|
|
684
|
-
export function isNotNullOrUndefined(value:
|
|
898
|
+
export function isNotNullOrUndefined<T>(value: T): value is T;
|
|
685
899
|
|
|
686
900
|
// @public (undocumented)
|
|
687
901
|
export function isNotTruthy(value: any): boolean;
|
|
688
902
|
|
|
689
903
|
// @public (undocumented)
|
|
690
|
-
export function isNotUndefined(value:
|
|
904
|
+
export function isNotUndefined<T>(value: T): value is T;
|
|
691
905
|
|
|
692
906
|
// @public (undocumented)
|
|
693
|
-
export function isNullOrUndefined(value: any):
|
|
907
|
+
export function isNullOrUndefined(value: any): value is null | undefined;
|
|
694
908
|
|
|
695
909
|
// @public
|
|
696
910
|
export function isNumber(value: any): value is number;
|
|
697
911
|
|
|
698
912
|
// @public (undocumented)
|
|
699
|
-
export function isObject(value:
|
|
913
|
+
export function isObject<T>(value: T): value is T;
|
|
700
914
|
|
|
701
915
|
// @public
|
|
702
916
|
export function isReactNative(): boolean;
|
|
@@ -717,11 +931,22 @@ export function isTruthy(value: any): boolean;
|
|
|
717
931
|
export function isTypeof(value: any, theType: string): boolean;
|
|
718
932
|
|
|
719
933
|
// @public (undocumented)
|
|
720
|
-
export function isUndefined(value: any):
|
|
934
|
+
export function isUndefined(value: any): value is undefined;
|
|
721
935
|
|
|
722
936
|
// @public
|
|
723
937
|
export function isXhrSupported(): boolean;
|
|
724
938
|
|
|
939
|
+
// @public (undocumented)
|
|
940
|
+
export interface ITelemetryInitializerContainer {
|
|
941
|
+
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
// @public (undocumented)
|
|
945
|
+
export interface ITelemetryInitializerHandler {
|
|
946
|
+
// (undocumented)
|
|
947
|
+
remove(): void;
|
|
948
|
+
}
|
|
949
|
+
|
|
725
950
|
// @public
|
|
726
951
|
export interface ITelemetryItem {
|
|
727
952
|
baseData?: {
|
|
@@ -739,28 +964,65 @@ export interface ITelemetryItem {
|
|
|
739
964
|
ver?: string;
|
|
740
965
|
}
|
|
741
966
|
|
|
967
|
+
// Warning: (ae-forgotten-export) The symbol "ITelemetryProcessor" needs to be exported by the entry point applicationinsights-core-js.d.ts
|
|
968
|
+
//
|
|
742
969
|
// @public
|
|
743
|
-
export interface ITelemetryPlugin extends IPlugin {
|
|
970
|
+
export interface ITelemetryPlugin extends ITelemetryProcessor, IPlugin {
|
|
744
971
|
readonly priority: number;
|
|
745
|
-
processTelemetry: (env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => void;
|
|
746
972
|
setNextPlugin?: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
|
|
747
973
|
}
|
|
748
974
|
|
|
749
975
|
// @public
|
|
750
|
-
export interface ITelemetryPluginChain {
|
|
976
|
+
export interface ITelemetryPluginChain extends ITelemetryProcessor {
|
|
751
977
|
getNext: () => ITelemetryPluginChain;
|
|
752
978
|
getPlugin: () => ITelemetryPlugin;
|
|
753
|
-
|
|
979
|
+
unload?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
// @public (undocumented)
|
|
983
|
+
export interface ITelemetryUnloadState {
|
|
984
|
+
// (undocumented)
|
|
985
|
+
flushComplete?: boolean;
|
|
986
|
+
// (undocumented)
|
|
987
|
+
isAsync: boolean;
|
|
988
|
+
// (undocumented)
|
|
989
|
+
reason: TelemetryUnloadReason;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
// @public (undocumented)
|
|
993
|
+
export interface ITelemetryUpdateState {
|
|
994
|
+
added?: IPlugin[];
|
|
995
|
+
reason: TelemetryUpdateReason;
|
|
996
|
+
removed?: IPlugin[];
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
// @public (undocumented)
|
|
1000
|
+
export interface IUnloadableComponent {
|
|
1001
|
+
_doUnload?: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void) => void | boolean;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
// @public (undocumented)
|
|
1005
|
+
export interface IUnloadHandlerContainer {
|
|
1006
|
+
// (undocumented)
|
|
1007
|
+
add: (handler: UnloadHandler) => void;
|
|
1008
|
+
// (undocumented)
|
|
1009
|
+
run: (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
754
1010
|
}
|
|
755
1011
|
|
|
756
1012
|
// @public
|
|
757
1013
|
export function _legacyCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
758
1014
|
|
|
759
1015
|
// @public (undocumented)
|
|
760
|
-
export
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
1016
|
+
export const LoggingSeverity: EnumValue<typeof eLoggingSeverity>;
|
|
1017
|
+
|
|
1018
|
+
// @public (undocumented)
|
|
1019
|
+
export type LoggingSeverity = number | eLoggingSeverity;
|
|
1020
|
+
|
|
1021
|
+
// @public
|
|
1022
|
+
export function _logInternalMessage(logger: IDiagnosticLogger, severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
1023
|
+
|
|
1024
|
+
// @public (undocumented)
|
|
1025
|
+
export function mergeEvtNamespace(theNamespace: string, namespaces?: string | string[] | null): string | string[];
|
|
764
1026
|
|
|
765
1027
|
// @public (undocumented)
|
|
766
1028
|
export const MinChannelPriorty: number;
|
|
@@ -799,7 +1061,13 @@ export { objCreate }
|
|
|
799
1061
|
export function objDefineAccessors<T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void): boolean;
|
|
800
1062
|
|
|
801
1063
|
// @public
|
|
802
|
-
export function
|
|
1064
|
+
export function objExtend<T2, T3, T4, T5, T6>(deepExtend?: boolean, obj2?: T2, obj3?: T3, obj4?: T4, obj5?: T5, obj6?: T6): T2 & T3 & T4 & T5 & T6;
|
|
1065
|
+
|
|
1066
|
+
// @public (undocumented)
|
|
1067
|
+
export function objExtend<T1, T2, T3, T4, T5, T6>(obj1?: T1, obj2?: T2, obj3?: T3, obj4?: T4, obj5?: T5, obj6?: T6): T1 & T2 & T3 & T4 & T5 & T6;
|
|
1068
|
+
|
|
1069
|
+
// @public
|
|
1070
|
+
export function objForEachKey<T = any>(target: T, callbackfn: (name: string, value: T[keyof T]) => void): void;
|
|
803
1071
|
|
|
804
1072
|
// @public (undocumented)
|
|
805
1073
|
export const objFreeze: <T>(value: T) => T;
|
|
@@ -810,6 +1078,9 @@ export function objKeys(obj: {}): string[];
|
|
|
810
1078
|
// @public (undocumented)
|
|
811
1079
|
export const objSeal: <T>(value: T) => T;
|
|
812
1080
|
|
|
1081
|
+
// @public (undocumented)
|
|
1082
|
+
export function objToString(obj: any): any;
|
|
1083
|
+
|
|
813
1084
|
// @public
|
|
814
1085
|
export function optimizeObject<T>(theObject: T): T;
|
|
815
1086
|
|
|
@@ -837,7 +1108,7 @@ export class PerfEvent implements IPerfEvent {
|
|
|
837
1108
|
|
|
838
1109
|
// @public (undocumented)
|
|
839
1110
|
export class PerfManager implements IPerfManager {
|
|
840
|
-
constructor(manager
|
|
1111
|
+
constructor(manager?: INotificationManager);
|
|
841
1112
|
create(src: string, payload?: any, isAsync?: boolean): IPerfEvent | null | undefined;
|
|
842
1113
|
fire(perfEvent: IPerfEvent): void;
|
|
843
1114
|
getCtx(key: string): any;
|
|
@@ -847,25 +1118,33 @@ export class PerfManager implements IPerfManager {
|
|
|
847
1118
|
// @public
|
|
848
1119
|
export function perfNow(): number;
|
|
849
1120
|
|
|
850
|
-
// @public
|
|
1121
|
+
// @public @deprecated
|
|
851
1122
|
export class ProcessTelemetryContext implements IProcessTelemetryContext {
|
|
852
|
-
constructor(
|
|
1123
|
+
constructor(pluginChain: ITelemetryPluginChain, config: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin);
|
|
853
1124
|
core: () => IAppInsightsCore;
|
|
854
1125
|
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryContext;
|
|
855
1126
|
diagLog: () => IDiagnosticLogger;
|
|
856
1127
|
getCfg: () => IConfiguration;
|
|
857
1128
|
// (undocumented)
|
|
858
|
-
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean) => number | string | boolean;
|
|
1129
|
+
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean | string[] | RegExp[] | Function) => number | string | boolean | string[] | RegExp[] | Function;
|
|
859
1130
|
// (undocumented)
|
|
860
1131
|
getExtCfg: <T>(identifier: string, defaultValue?: T | any) => T;
|
|
861
1132
|
getNext: () => ITelemetryPluginChain;
|
|
862
1133
|
hasNext: () => boolean;
|
|
863
|
-
|
|
1134
|
+
iterate: <T extends ITelemetryPlugin = ITelemetryPlugin>(callback: (plugin: T) => void) => void;
|
|
1135
|
+
onComplete: (onComplete: () => void) => void;
|
|
1136
|
+
processNext: (env: ITelemetryItem) => boolean | void;
|
|
864
1137
|
setNext: (nextCtx: ITelemetryPluginChain) => void;
|
|
865
1138
|
}
|
|
866
1139
|
|
|
867
1140
|
// @public
|
|
868
|
-
export function proxyAssign(target:
|
|
1141
|
+
export function proxyAssign<T, S>(target: T, source: S, chkSet?: (name: string, isFunc?: boolean, source?: S, target?: T) => boolean): T;
|
|
1142
|
+
|
|
1143
|
+
// @public
|
|
1144
|
+
export function proxyFunctionAs<T, S>(target: T, name: string, source: S | (() => S), theFunc: (keyof S), overwriteTarget?: boolean): void;
|
|
1145
|
+
|
|
1146
|
+
// @public
|
|
1147
|
+
export function proxyFunctions<T, S>(target: T, source: S | (() => S), functionsToProxy: (keyof S)[], overwriteTarget?: boolean): T;
|
|
869
1148
|
|
|
870
1149
|
// @public
|
|
871
1150
|
export function random32(signed?: boolean): number;
|
|
@@ -873,6 +1152,21 @@ export function random32(signed?: boolean): number;
|
|
|
873
1152
|
// @public
|
|
874
1153
|
export function randomValue(maxValue: number): number;
|
|
875
1154
|
|
|
1155
|
+
// @public
|
|
1156
|
+
export function removeEventHandler(eventName: string, callback: any, evtNamespace?: string | string[] | null): void;
|
|
1157
|
+
|
|
1158
|
+
// @public
|
|
1159
|
+
export function removeEventListeners(events: string[], listener: any, evtNamespace?: string | string[]): void;
|
|
1160
|
+
|
|
1161
|
+
// @public
|
|
1162
|
+
export function removePageHideEventListener(listener: any, evtNamespace?: string | string[] | null): void;
|
|
1163
|
+
|
|
1164
|
+
// @public
|
|
1165
|
+
export function removePageShowEventListener(listener: any, evtNamespace?: string | string[] | null): void;
|
|
1166
|
+
|
|
1167
|
+
// @public
|
|
1168
|
+
export function removePageUnloadEventListener(listener: any, evtNamespace?: string | string[]): void;
|
|
1169
|
+
|
|
876
1170
|
// @public
|
|
877
1171
|
export function safeGetCookieMgr(core: IAppInsightsCore, config?: IConfiguration): ICookieMgr;
|
|
878
1172
|
|
|
@@ -887,6 +1181,7 @@ export const enum SendRequestReason {
|
|
|
887
1181
|
NormalSchedule = 1,
|
|
888
1182
|
Resumed = 4,
|
|
889
1183
|
Retry = 5,
|
|
1184
|
+
SdkUnload = 6,
|
|
890
1185
|
SyncEvent = 3,
|
|
891
1186
|
Undefined = 0,
|
|
892
1187
|
Unload = 2
|
|
@@ -902,10 +1197,10 @@ export function setEnableEnvMocks(enabled: boolean): void;
|
|
|
902
1197
|
export function setGblPerfMgr(perfManager: IPerfManager): void;
|
|
903
1198
|
|
|
904
1199
|
// @public
|
|
905
|
-
export function setValue<T, K extends keyof T>(target: T, field: K, value: T[K], valChk?: (value: T[K]) => boolean, srcChk?: (value: T[K]) => boolean): T[K];
|
|
1200
|
+
export function setValue<T, K extends keyof T>(target: T, field: K, value: T[K], valChk?: ((value: T[K]) => boolean) | null, srcChk?: ((value: T[K]) => boolean) | null): T[K];
|
|
906
1201
|
|
|
907
1202
|
// @public (undocumented)
|
|
908
|
-
export function sortPlugins(plugins:
|
|
1203
|
+
export function sortPlugins<T = IPlugin>(plugins: T[]): T[];
|
|
909
1204
|
|
|
910
1205
|
// @public
|
|
911
1206
|
export function strContains(value: string, search: string): boolean;
|
|
@@ -939,9 +1234,30 @@ export interface Tags {
|
|
|
939
1234
|
[key: string]: any;
|
|
940
1235
|
}
|
|
941
1236
|
|
|
1237
|
+
// @public (undocumented)
|
|
1238
|
+
export type TelemetryInitializerFunction = <T extends ITelemetryItem>(item: T) => boolean | void;
|
|
1239
|
+
|
|
1240
|
+
// @public
|
|
1241
|
+
export const enum TelemetryUnloadReason {
|
|
1242
|
+
ManualTeardown = 0,
|
|
1243
|
+
PluginReplace = 2,
|
|
1244
|
+
PluginUnload = 1,
|
|
1245
|
+
SdkUnload = 50
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
// @public
|
|
1249
|
+
export const enum TelemetryUpdateReason {
|
|
1250
|
+
PluginAdded = 16,
|
|
1251
|
+
PluginRemoved = 32,
|
|
1252
|
+
Unknown = 0
|
|
1253
|
+
}
|
|
1254
|
+
|
|
942
1255
|
// @public (undocumented)
|
|
943
1256
|
export function throwError(message: string): never;
|
|
944
1257
|
|
|
1258
|
+
// @public
|
|
1259
|
+
export function _throwInternal(logger: IDiagnosticLogger, severity: LoggingSeverity, msgId: _InternalMessageId, msg: string, properties?: Object, isUserAct?: boolean): void;
|
|
1260
|
+
|
|
945
1261
|
// @public
|
|
946
1262
|
export function toISOString(date: Date): string;
|
|
947
1263
|
|
|
@@ -951,9 +1267,18 @@ export function uaDisallowsSameSiteNone(userAgent: string): boolean;
|
|
|
951
1267
|
// @public (undocumented)
|
|
952
1268
|
export const Undefined = "undefined";
|
|
953
1269
|
|
|
1270
|
+
// @public
|
|
1271
|
+
export function unloadComponents(components: any | IUnloadableComponent[], unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void): void | boolean;
|
|
1272
|
+
|
|
1273
|
+
// @public (undocumented)
|
|
1274
|
+
export type UnloadHandler = (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
1275
|
+
|
|
954
1276
|
// @public (undocumented)
|
|
955
1277
|
export function useXDomainRequest(): boolean | undefined;
|
|
956
1278
|
|
|
1279
|
+
// @public
|
|
1280
|
+
export function _warnToConsole(logger: IDiagnosticLogger, message: string): void;
|
|
1281
|
+
|
|
957
1282
|
// (No @packageDocumentation comment for this package)
|
|
958
1283
|
|
|
959
1284
|
```
|