@microsoft/applicationinsights-core-js 2.8.0-nightly.2202-06 → 2.8.0-nightly.2204-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 +1999 -793
- 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 +16363 -9167
- package/dist/applicationinsights-core-js.api.md +425 -48
- package/dist/applicationinsights-core-js.d.ts +784 -123
- package/dist/applicationinsights-core-js.js +1999 -793
- 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 +784 -123
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +3 -69
- 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 +25 -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 +89 -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/EventsDiscardedReason.js +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 +12 -7
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +2 -2
- package/src/JavaScriptSDK/AppInsightsCore.ts +2 -101
- 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 +27 -12
- package/src/JavaScriptSDK/EnvUtils.ts +13 -12
- package/src/JavaScriptSDK/EventHelpers.ts +550 -0
- package/src/JavaScriptSDK/HelperFuncs.ts +123 -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/LoggingEnums.ts +184 -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 +10 -0
- package/types/JavaScriptSDK/EventHelpers.d.ts +154 -0
- package/types/JavaScriptSDK/HelperFuncs.d.ts +33 -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/LoggingEnums.d.ts +91 -2
- 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 +18 -9
- 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,21 @@ 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 createEnumStyle<T>(values: T): T;
|
|
149
|
+
|
|
150
|
+
// @public
|
|
151
|
+
export function createProcessTelemetryContext(telemetryChain: ITelemetryPluginChain | null, config: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin): IProcessTelemetryContext;
|
|
152
|
+
|
|
153
|
+
// @public (undocumented)
|
|
154
|
+
export function createUniqueNamespace(name: string, includeVersion?: boolean): string;
|
|
155
|
+
|
|
156
|
+
// @public (undocumented)
|
|
157
|
+
export function createUnloadHandlerContainer(): {
|
|
158
|
+
add: (handler: UnloadHandler) => void;
|
|
159
|
+
run: (unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
160
|
+
};
|
|
161
|
+
|
|
129
162
|
// @public
|
|
130
163
|
export function dateNow(): number;
|
|
131
164
|
|
|
@@ -161,9 +194,189 @@ export function doPerf<T>(mgrSource: IPerfManagerProvider | IPerfManager, getSou
|
|
|
161
194
|
// @public
|
|
162
195
|
export function dumpObj(object: any): string;
|
|
163
196
|
|
|
197
|
+
// @public (undocumented)
|
|
198
|
+
export const enum _eInternalMessageId {
|
|
199
|
+
// (undocumented)
|
|
200
|
+
BrowserCannotReadLocalStorage = 1,
|
|
201
|
+
// (undocumented)
|
|
202
|
+
BrowserCannotReadSessionStorage = 2,
|
|
203
|
+
// (undocumented)
|
|
204
|
+
BrowserCannotWriteLocalStorage = 3,
|
|
205
|
+
// (undocumented)
|
|
206
|
+
BrowserCannotWriteSessionStorage = 4,
|
|
207
|
+
// (undocumented)
|
|
208
|
+
BrowserDoesNotSupportLocalStorage = 0,
|
|
209
|
+
// (undocumented)
|
|
210
|
+
BrowserFailedRemovalFromLocalStorage = 5,
|
|
211
|
+
// (undocumented)
|
|
212
|
+
BrowserFailedRemovalFromSessionStorage = 6,
|
|
213
|
+
// (undocumented)
|
|
214
|
+
CannotAccessCookie = 68,
|
|
215
|
+
// (undocumented)
|
|
216
|
+
CannotParseAiBlobValue = 101,
|
|
217
|
+
// (undocumented)
|
|
218
|
+
CannotSendEmptyTelemetry = 7,
|
|
219
|
+
// (undocumented)
|
|
220
|
+
CannotSerializeObject = 48,
|
|
221
|
+
// (undocumented)
|
|
222
|
+
CannotSerializeObjectNonSerializable = 49,
|
|
223
|
+
// (undocumented)
|
|
224
|
+
CircularReferenceDetected = 50,
|
|
225
|
+
// (undocumented)
|
|
226
|
+
ClearAuthContextFailed = 51,
|
|
227
|
+
// (undocumented)
|
|
228
|
+
ClientPerformanceMathError = 8,
|
|
229
|
+
// (undocumented)
|
|
230
|
+
CreateEnvelopeError = 47,
|
|
231
|
+
// (undocumented)
|
|
232
|
+
ErrorParsingAISessionCookie = 9,
|
|
233
|
+
// (undocumented)
|
|
234
|
+
ErrorPVCalc = 10,
|
|
235
|
+
// (undocumented)
|
|
236
|
+
ExceptionTruncated = 52,
|
|
237
|
+
// (undocumented)
|
|
238
|
+
ExceptionWhileLoggingError = 11,
|
|
239
|
+
// (undocumented)
|
|
240
|
+
FailedAddingCustomDefinedRequestContext = 104,
|
|
241
|
+
// (undocumented)
|
|
242
|
+
FailedAddingTelemetryToBuffer = 12,
|
|
243
|
+
// (undocumented)
|
|
244
|
+
FailedMonitorAjaxAbort = 13,
|
|
245
|
+
// (undocumented)
|
|
246
|
+
FailedMonitorAjaxDur = 14,
|
|
247
|
+
// (undocumented)
|
|
248
|
+
FailedMonitorAjaxGetCorrelationHeader = 18,
|
|
249
|
+
// (undocumented)
|
|
250
|
+
FailedMonitorAjaxOpen = 15,
|
|
251
|
+
// (undocumented)
|
|
252
|
+
FailedMonitorAjaxRSC = 16,
|
|
253
|
+
// (undocumented)
|
|
254
|
+
FailedMonitorAjaxSend = 17,
|
|
255
|
+
// (undocumented)
|
|
256
|
+
FailedMonitorAjaxSetRequestHeader = 71,
|
|
257
|
+
// (undocumented)
|
|
258
|
+
FailedToAddHandlerForOnBeforeUnload = 19,
|
|
259
|
+
// (undocumented)
|
|
260
|
+
FailedToFixDepricatedValues = 44,
|
|
261
|
+
// (undocumented)
|
|
262
|
+
FailedToReportDataLoss = 21,
|
|
263
|
+
// (undocumented)
|
|
264
|
+
FailedToRestoreStorageBuffer = 42,
|
|
265
|
+
// (undocumented)
|
|
266
|
+
FailedToSendQueuedTelemetry = 20,
|
|
267
|
+
// (undocumented)
|
|
268
|
+
FailedToSetStorageBuffer = 41,
|
|
269
|
+
// (undocumented)
|
|
270
|
+
FlushFailed = 22,
|
|
271
|
+
// (undocumented)
|
|
272
|
+
IdTooLong = 69,
|
|
273
|
+
// (undocumented)
|
|
274
|
+
IllegalCharsInName = 53,
|
|
275
|
+
// (undocumented)
|
|
276
|
+
InMemoryStorageBufferFull = 105,
|
|
277
|
+
// (undocumented)
|
|
278
|
+
InvalidBackendResponse = 43,
|
|
279
|
+
// (undocumented)
|
|
280
|
+
InvalidContentBlob = 102,
|
|
281
|
+
// (undocumented)
|
|
282
|
+
InvalidDurationValue = 45,
|
|
283
|
+
// (undocumented)
|
|
284
|
+
InvalidEvent = 70,
|
|
285
|
+
// (undocumented)
|
|
286
|
+
InvalidInstrumentationKey = 100,
|
|
287
|
+
// (undocumented)
|
|
288
|
+
ItemNotInArray = 54,
|
|
289
|
+
// (undocumented)
|
|
290
|
+
MaxAjaxPerPVExceeded = 55,
|
|
291
|
+
// (undocumented)
|
|
292
|
+
MessageLimitPerPVExceeded = 23,
|
|
293
|
+
// (undocumented)
|
|
294
|
+
MessageTruncated = 56,
|
|
295
|
+
// (undocumented)
|
|
296
|
+
MissingRequiredFieldSpecification = 24,
|
|
297
|
+
// (undocumented)
|
|
298
|
+
NameTooLong = 57,
|
|
299
|
+
// (undocumented)
|
|
300
|
+
NavigationTimingNotSupported = 25,
|
|
301
|
+
// (undocumented)
|
|
302
|
+
NotificationException = 74,
|
|
303
|
+
// (undocumented)
|
|
304
|
+
OnError = 26,
|
|
305
|
+
// (undocumented)
|
|
306
|
+
PluginException = 73,
|
|
307
|
+
// (undocumented)
|
|
308
|
+
SampleRateOutOfRange = 58,
|
|
309
|
+
// (undocumented)
|
|
310
|
+
SendBrowserInfoOnUserInit = 72,
|
|
311
|
+
// (undocumented)
|
|
312
|
+
SenderNotInitialized = 28,
|
|
313
|
+
// (undocumented)
|
|
314
|
+
SessionRenewalDateIsZero = 27,
|
|
315
|
+
// (undocumented)
|
|
316
|
+
SessionStorageBufferFull = 67,
|
|
317
|
+
// (undocumented)
|
|
318
|
+
SetAuthContextFailed = 59,
|
|
319
|
+
// (undocumented)
|
|
320
|
+
SetAuthContextFailedAccountName = 60,
|
|
321
|
+
// (undocumented)
|
|
322
|
+
SnippetScriptLoadFailure = 99,
|
|
323
|
+
// (undocumented)
|
|
324
|
+
StartCalledMoreThanOnce = 62,
|
|
325
|
+
// (undocumented)
|
|
326
|
+
StartTrackEventFailed = 29,
|
|
327
|
+
// (undocumented)
|
|
328
|
+
StartTrackFailed = 31,
|
|
329
|
+
// (undocumented)
|
|
330
|
+
StopCalledWithoutStart = 63,
|
|
331
|
+
// (undocumented)
|
|
332
|
+
StopTrackEventFailed = 30,
|
|
333
|
+
// (undocumented)
|
|
334
|
+
StopTrackFailed = 32,
|
|
335
|
+
// (undocumented)
|
|
336
|
+
StringValueTooLong = 61,
|
|
337
|
+
// (undocumented)
|
|
338
|
+
TelemetryEnvelopeInvalid = 46,
|
|
339
|
+
// (undocumented)
|
|
340
|
+
TelemetryInitializerFailed = 64,
|
|
341
|
+
// (undocumented)
|
|
342
|
+
TelemetrySampledAndNotSent = 33,
|
|
343
|
+
// (undocumented)
|
|
344
|
+
TrackArgumentsNotSpecified = 65,
|
|
345
|
+
// (undocumented)
|
|
346
|
+
TrackEventFailed = 34,
|
|
347
|
+
// (undocumented)
|
|
348
|
+
TrackExceptionFailed = 35,
|
|
349
|
+
// (undocumented)
|
|
350
|
+
TrackMetricFailed = 36,
|
|
351
|
+
// (undocumented)
|
|
352
|
+
TrackPageActionEventFailed = 103,
|
|
353
|
+
// (undocumented)
|
|
354
|
+
TrackPVFailed = 37,
|
|
355
|
+
// (undocumented)
|
|
356
|
+
TrackPVFailedCalc = 38,
|
|
357
|
+
// (undocumented)
|
|
358
|
+
TrackTraceFailed = 39,
|
|
359
|
+
// (undocumented)
|
|
360
|
+
TransmissionFailed = 40,
|
|
361
|
+
// (undocumented)
|
|
362
|
+
UrlTooLong = 66
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// @public (undocumented)
|
|
366
|
+
export const enum eLoggingSeverity {
|
|
367
|
+
CRITICAL = 1,
|
|
368
|
+
WARNING = 2
|
|
369
|
+
}
|
|
370
|
+
|
|
164
371
|
// @public (undocumented)
|
|
165
372
|
export const EventHelper: IEventHelper;
|
|
166
373
|
|
|
374
|
+
// @public
|
|
375
|
+
export function eventOff<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): void;
|
|
376
|
+
|
|
377
|
+
// @public
|
|
378
|
+
export function eventOn<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): boolean;
|
|
379
|
+
|
|
167
380
|
// @public
|
|
168
381
|
export const EventsDiscardedReason: {
|
|
169
382
|
Unknown: number;
|
|
@@ -198,6 +411,16 @@ export function getDocument(): Document | null;
|
|
|
198
411
|
// @public
|
|
199
412
|
export function getExceptionName(object: any): string;
|
|
200
413
|
|
|
414
|
+
// @public (undocumented)
|
|
415
|
+
export const enum GetExtCfgMergeType {
|
|
416
|
+
// (undocumented)
|
|
417
|
+
MergeDefaultFromRootOrDefault = 2,
|
|
418
|
+
// (undocumented)
|
|
419
|
+
MergeDefaultOnly = 1,
|
|
420
|
+
// (undocumented)
|
|
421
|
+
None = 0
|
|
422
|
+
}
|
|
423
|
+
|
|
201
424
|
// @public
|
|
202
425
|
export function getGblPerfMgr(): IPerfManager;
|
|
203
426
|
|
|
@@ -254,10 +477,16 @@ export function hasWindow(): boolean;
|
|
|
254
477
|
// @public (undocumented)
|
|
255
478
|
export interface IAppInsightsCore extends IPerfManagerProvider {
|
|
256
479
|
addNotificationListener?(listener: INotificationListener): void;
|
|
480
|
+
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
|
|
481
|
+
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
|
|
482
|
+
addUnloadCb(handler: UnloadHandler): void;
|
|
257
483
|
// (undocumented)
|
|
258
484
|
config: IConfiguration;
|
|
485
|
+
evtNamespace(): string;
|
|
486
|
+
flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason, cbTimeout?: number): boolean | void;
|
|
259
487
|
getCookieMgr(): ICookieMgr;
|
|
260
488
|
getNotifyMgr(): INotificationManager;
|
|
489
|
+
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
261
490
|
getProcessTelContext(): IProcessTelemetryContext;
|
|
262
491
|
// (undocumented)
|
|
263
492
|
getTransmissionControls(): IChannelControls[][];
|
|
@@ -274,14 +503,30 @@ export interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
274
503
|
stopPollingInternalLogs?(): void;
|
|
275
504
|
// (undocumented)
|
|
276
505
|
track(telemetryItem: ITelemetryItem): void;
|
|
506
|
+
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
// @public (undocumented)
|
|
510
|
+
export interface IBaseProcessingContext {
|
|
511
|
+
core: () => IAppInsightsCore;
|
|
512
|
+
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IBaseProcessingContext;
|
|
513
|
+
diagLog: () => IDiagnosticLogger;
|
|
514
|
+
getCfg: () => IConfiguration;
|
|
515
|
+
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean | string[] | RegExp[] | Function) => number | string | boolean | string[] | RegExp[] | Function;
|
|
516
|
+
getExtCfg: <T>(identifier: string, defaultValue?: T | any, mergeDefault?: GetExtCfgMergeType) => T;
|
|
517
|
+
getNext: () => ITelemetryPluginChain;
|
|
518
|
+
hasNext: () => boolean;
|
|
519
|
+
iterate: <T extends ITelemetryPlugin = ITelemetryPlugin>(callback: (plugin: T) => void) => void;
|
|
520
|
+
onComplete: (onComplete: () => void, that?: any, ...args: any[]) => void;
|
|
521
|
+
setNext: (nextCtx: ITelemetryPluginChain) => void;
|
|
277
522
|
}
|
|
278
523
|
|
|
279
524
|
// @public
|
|
280
525
|
export interface IChannelControls extends ITelemetryPlugin {
|
|
281
|
-
flush(async: boolean, callBack?: () => void): void;
|
|
526
|
+
flush(async: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): boolean | void;
|
|
282
527
|
pause(): void;
|
|
283
528
|
resume(): void;
|
|
284
|
-
teardown()
|
|
529
|
+
teardown: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
|
|
285
530
|
}
|
|
286
531
|
|
|
287
532
|
// @public
|
|
@@ -335,7 +580,7 @@ export interface ICookieMgrConfig {
|
|
|
335
580
|
|
|
336
581
|
// @public @deprecated
|
|
337
582
|
export interface ICoreUtils {
|
|
338
|
-
addEventHandler: (eventName: string, callback: any) => boolean;
|
|
583
|
+
addEventHandler: (eventName: string, callback: any, evtNamespace?: string | string[]) => boolean;
|
|
339
584
|
arrForEach: <T>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => void | number, thisArg?: any) => void;
|
|
340
585
|
arrIndexOf: <T>(arr: T[], searchElement: T, fromIndex?: number) => number;
|
|
341
586
|
arrMap: <T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any) => R[];
|
|
@@ -430,6 +675,7 @@ export interface IEventHelper {
|
|
|
430
675
|
export interface IInstrumentCallDetails {
|
|
431
676
|
ctx: () => any;
|
|
432
677
|
err?: Error;
|
|
678
|
+
evt?: Event;
|
|
433
679
|
// (undocumented)
|
|
434
680
|
inst: any;
|
|
435
681
|
// (undocumented)
|
|
@@ -461,12 +707,23 @@ export interface IInstrumentHooks {
|
|
|
461
707
|
export interface IInstrumentHooksCallbacks {
|
|
462
708
|
fnErr?: InstrumentorHooksCallback;
|
|
463
709
|
hkErr?: InstrumentorHooksCallback;
|
|
710
|
+
ns?: string | string[];
|
|
464
711
|
req?: InstrumentorHooksCallback;
|
|
465
712
|
rsp?: InstrumentorHooksCallback;
|
|
466
713
|
}
|
|
467
714
|
|
|
715
|
+
// @public (undocumented)
|
|
716
|
+
export interface ILoadedPlugin<T extends IPlugin> {
|
|
717
|
+
isEnabled: () => boolean;
|
|
718
|
+
// (undocumented)
|
|
719
|
+
plugin: T;
|
|
720
|
+
// (undocumented)
|
|
721
|
+
remove: (isAsync?: boolean, removeCb?: (removed?: boolean) => void) => void;
|
|
722
|
+
setEnabled: (isEnabled: boolean) => void;
|
|
723
|
+
}
|
|
724
|
+
|
|
468
725
|
// @public
|
|
469
|
-
export function initializePlugins(processContext:
|
|
726
|
+
export function initializePlugins(processContext: IProcessTelemetryContext, extensions: IPlugin[]): void;
|
|
470
727
|
|
|
471
728
|
// @public
|
|
472
729
|
export interface INotificationListener {
|
|
@@ -601,7 +858,7 @@ export const _InternalMessageId: {
|
|
|
601
858
|
};
|
|
602
859
|
|
|
603
860
|
// @public (undocumented)
|
|
604
|
-
export type _InternalMessageId = number |
|
|
861
|
+
export type _InternalMessageId = number | _eInternalMessageId;
|
|
605
862
|
|
|
606
863
|
// @public
|
|
607
864
|
export interface IPerfEvent {
|
|
@@ -638,22 +895,34 @@ export interface IPlugin {
|
|
|
638
895
|
readonly identifier: string;
|
|
639
896
|
initialize: (config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain) => void;
|
|
640
897
|
isInitialized?: () => boolean;
|
|
641
|
-
teardown?: () => void;
|
|
898
|
+
teardown?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
|
|
642
899
|
readonly version?: string;
|
|
643
900
|
}
|
|
644
901
|
|
|
645
902
|
// @public
|
|
646
|
-
export interface IProcessTelemetryContext {
|
|
647
|
-
core: () => IAppInsightsCore;
|
|
903
|
+
export interface IProcessTelemetryContext extends IBaseProcessingContext {
|
|
648
904
|
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryContext;
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
processNext: (
|
|
656
|
-
|
|
905
|
+
processNext: (env: ITelemetryItem) => boolean | void;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
// @public
|
|
909
|
+
export interface IProcessTelemetryUnloadContext extends IBaseProcessingContext {
|
|
910
|
+
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryUnloadContext;
|
|
911
|
+
processNext: (unloadState: ITelemetryUnloadState) => boolean | void;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
// @public
|
|
915
|
+
export interface IProcessTelemetryUpdateContext extends IBaseProcessingContext {
|
|
916
|
+
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryUpdateContext;
|
|
917
|
+
processNext: (updateState: ITelemetryUpdateState) => boolean | void;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
// @public (undocumented)
|
|
921
|
+
export interface _IRegisteredEvents {
|
|
922
|
+
// (undocumented)
|
|
923
|
+
handler: any;
|
|
924
|
+
// (undocumented)
|
|
925
|
+
name: string;
|
|
657
926
|
}
|
|
658
927
|
|
|
659
928
|
// @public
|
|
@@ -681,22 +950,22 @@ export function isFunction(value: any): value is Function;
|
|
|
681
950
|
export function isIE(): boolean;
|
|
682
951
|
|
|
683
952
|
// @public (undocumented)
|
|
684
|
-
export function isNotNullOrUndefined(value:
|
|
953
|
+
export function isNotNullOrUndefined<T>(value: T): value is T;
|
|
685
954
|
|
|
686
955
|
// @public (undocumented)
|
|
687
956
|
export function isNotTruthy(value: any): boolean;
|
|
688
957
|
|
|
689
958
|
// @public (undocumented)
|
|
690
|
-
export function isNotUndefined(value:
|
|
959
|
+
export function isNotUndefined<T>(value: T): value is T;
|
|
691
960
|
|
|
692
961
|
// @public (undocumented)
|
|
693
|
-
export function isNullOrUndefined(value: any):
|
|
962
|
+
export function isNullOrUndefined(value: any): value is null | undefined;
|
|
694
963
|
|
|
695
964
|
// @public
|
|
696
965
|
export function isNumber(value: any): value is number;
|
|
697
966
|
|
|
698
967
|
// @public (undocumented)
|
|
699
|
-
export function isObject(value:
|
|
968
|
+
export function isObject<T>(value: T): value is T;
|
|
700
969
|
|
|
701
970
|
// @public
|
|
702
971
|
export function isReactNative(): boolean;
|
|
@@ -717,11 +986,22 @@ export function isTruthy(value: any): boolean;
|
|
|
717
986
|
export function isTypeof(value: any, theType: string): boolean;
|
|
718
987
|
|
|
719
988
|
// @public (undocumented)
|
|
720
|
-
export function isUndefined(value: any):
|
|
989
|
+
export function isUndefined(value: any): value is undefined;
|
|
721
990
|
|
|
722
991
|
// @public
|
|
723
992
|
export function isXhrSupported(): boolean;
|
|
724
993
|
|
|
994
|
+
// @public (undocumented)
|
|
995
|
+
export interface ITelemetryInitializerContainer {
|
|
996
|
+
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
// @public (undocumented)
|
|
1000
|
+
export interface ITelemetryInitializerHandler {
|
|
1001
|
+
// (undocumented)
|
|
1002
|
+
remove(): void;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
725
1005
|
// @public
|
|
726
1006
|
export interface ITelemetryItem {
|
|
727
1007
|
baseData?: {
|
|
@@ -739,28 +1019,65 @@ export interface ITelemetryItem {
|
|
|
739
1019
|
ver?: string;
|
|
740
1020
|
}
|
|
741
1021
|
|
|
1022
|
+
// Warning: (ae-forgotten-export) The symbol "ITelemetryProcessor" needs to be exported by the entry point applicationinsights-core-js.d.ts
|
|
1023
|
+
//
|
|
742
1024
|
// @public
|
|
743
|
-
export interface ITelemetryPlugin extends IPlugin {
|
|
1025
|
+
export interface ITelemetryPlugin extends ITelemetryProcessor, IPlugin {
|
|
744
1026
|
readonly priority: number;
|
|
745
|
-
processTelemetry: (env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => void;
|
|
746
1027
|
setNextPlugin?: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
|
|
747
1028
|
}
|
|
748
1029
|
|
|
749
1030
|
// @public
|
|
750
|
-
export interface ITelemetryPluginChain {
|
|
1031
|
+
export interface ITelemetryPluginChain extends ITelemetryProcessor {
|
|
751
1032
|
getNext: () => ITelemetryPluginChain;
|
|
752
1033
|
getPlugin: () => ITelemetryPlugin;
|
|
753
|
-
|
|
1034
|
+
unload?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
// @public (undocumented)
|
|
1038
|
+
export interface ITelemetryUnloadState {
|
|
1039
|
+
// (undocumented)
|
|
1040
|
+
flushComplete?: boolean;
|
|
1041
|
+
// (undocumented)
|
|
1042
|
+
isAsync: boolean;
|
|
1043
|
+
// (undocumented)
|
|
1044
|
+
reason: TelemetryUnloadReason;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
// @public (undocumented)
|
|
1048
|
+
export interface ITelemetryUpdateState {
|
|
1049
|
+
added?: IPlugin[];
|
|
1050
|
+
reason: TelemetryUpdateReason;
|
|
1051
|
+
removed?: IPlugin[];
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
// @public (undocumented)
|
|
1055
|
+
export interface IUnloadableComponent {
|
|
1056
|
+
_doUnload?: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void) => void | boolean;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
// @public (undocumented)
|
|
1060
|
+
export interface IUnloadHandlerContainer {
|
|
1061
|
+
// (undocumented)
|
|
1062
|
+
add: (handler: UnloadHandler) => void;
|
|
1063
|
+
// (undocumented)
|
|
1064
|
+
run: (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
754
1065
|
}
|
|
755
1066
|
|
|
756
1067
|
// @public
|
|
757
1068
|
export function _legacyCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
758
1069
|
|
|
759
1070
|
// @public (undocumented)
|
|
760
|
-
export
|
|
761
|
-
CRITICAL
|
|
762
|
-
WARNING
|
|
763
|
-
}
|
|
1071
|
+
export const LoggingSeverity: {
|
|
1072
|
+
CRITICAL: number;
|
|
1073
|
+
WARNING: number;
|
|
1074
|
+
};
|
|
1075
|
+
|
|
1076
|
+
// @public (undocumented)
|
|
1077
|
+
export type LoggingSeverity = number | eLoggingSeverity;
|
|
1078
|
+
|
|
1079
|
+
// @public (undocumented)
|
|
1080
|
+
export function mergeEvtNamespace(theNamespace: string, namespaces?: string | string[] | null): string | string[];
|
|
764
1081
|
|
|
765
1082
|
// @public (undocumented)
|
|
766
1083
|
export const MinChannelPriorty: number;
|
|
@@ -799,7 +1116,13 @@ export { objCreate }
|
|
|
799
1116
|
export function objDefineAccessors<T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void): boolean;
|
|
800
1117
|
|
|
801
1118
|
// @public
|
|
802
|
-
export function
|
|
1119
|
+
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;
|
|
1120
|
+
|
|
1121
|
+
// @public (undocumented)
|
|
1122
|
+
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;
|
|
1123
|
+
|
|
1124
|
+
// @public
|
|
1125
|
+
export function objForEachKey<T = any>(target: T, callbackfn: (name: string, value: T[keyof T]) => void): void;
|
|
803
1126
|
|
|
804
1127
|
// @public (undocumented)
|
|
805
1128
|
export const objFreeze: <T>(value: T) => T;
|
|
@@ -810,6 +1133,9 @@ export function objKeys(obj: {}): string[];
|
|
|
810
1133
|
// @public (undocumented)
|
|
811
1134
|
export const objSeal: <T>(value: T) => T;
|
|
812
1135
|
|
|
1136
|
+
// @public (undocumented)
|
|
1137
|
+
export function objToString(obj: any): any;
|
|
1138
|
+
|
|
813
1139
|
// @public
|
|
814
1140
|
export function optimizeObject<T>(theObject: T): T;
|
|
815
1141
|
|
|
@@ -837,7 +1163,7 @@ export class PerfEvent implements IPerfEvent {
|
|
|
837
1163
|
|
|
838
1164
|
// @public (undocumented)
|
|
839
1165
|
export class PerfManager implements IPerfManager {
|
|
840
|
-
constructor(manager
|
|
1166
|
+
constructor(manager?: INotificationManager);
|
|
841
1167
|
create(src: string, payload?: any, isAsync?: boolean): IPerfEvent | null | undefined;
|
|
842
1168
|
fire(perfEvent: IPerfEvent): void;
|
|
843
1169
|
getCtx(key: string): any;
|
|
@@ -847,25 +1173,33 @@ export class PerfManager implements IPerfManager {
|
|
|
847
1173
|
// @public
|
|
848
1174
|
export function perfNow(): number;
|
|
849
1175
|
|
|
850
|
-
// @public
|
|
1176
|
+
// @public @deprecated
|
|
851
1177
|
export class ProcessTelemetryContext implements IProcessTelemetryContext {
|
|
852
|
-
constructor(
|
|
1178
|
+
constructor(pluginChain: ITelemetryPluginChain, config: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin);
|
|
853
1179
|
core: () => IAppInsightsCore;
|
|
854
1180
|
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryContext;
|
|
855
1181
|
diagLog: () => IDiagnosticLogger;
|
|
856
1182
|
getCfg: () => IConfiguration;
|
|
857
1183
|
// (undocumented)
|
|
858
|
-
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean) => number | string | boolean;
|
|
1184
|
+
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean | string[] | RegExp[] | Function) => number | string | boolean | string[] | RegExp[] | Function;
|
|
859
1185
|
// (undocumented)
|
|
860
1186
|
getExtCfg: <T>(identifier: string, defaultValue?: T | any) => T;
|
|
861
1187
|
getNext: () => ITelemetryPluginChain;
|
|
862
1188
|
hasNext: () => boolean;
|
|
863
|
-
|
|
1189
|
+
iterate: <T extends ITelemetryPlugin = ITelemetryPlugin>(callback: (plugin: T) => void) => void;
|
|
1190
|
+
onComplete: (onComplete: () => void) => void;
|
|
1191
|
+
processNext: (env: ITelemetryItem) => boolean | void;
|
|
864
1192
|
setNext: (nextCtx: ITelemetryPluginChain) => void;
|
|
865
1193
|
}
|
|
866
1194
|
|
|
867
1195
|
// @public
|
|
868
|
-
export function proxyAssign(target:
|
|
1196
|
+
export function proxyAssign<T, S>(target: T, source: S, chkSet?: (name: string, isFunc?: boolean, source?: S, target?: T) => boolean): T;
|
|
1197
|
+
|
|
1198
|
+
// @public (undocumented)
|
|
1199
|
+
export function proxyFunctionAs<T, S>(target: T, name: string, source: S | (() => S), theFunc: (keyof S), overwriteTarget?: boolean): void;
|
|
1200
|
+
|
|
1201
|
+
// @public
|
|
1202
|
+
export function proxyFunctions<T, S>(target: T, source: S | (() => S), functionsToProxy: (keyof S)[], overwriteTarget?: boolean): T;
|
|
869
1203
|
|
|
870
1204
|
// @public
|
|
871
1205
|
export function random32(signed?: boolean): number;
|
|
@@ -873,6 +1207,21 @@ export function random32(signed?: boolean): number;
|
|
|
873
1207
|
// @public
|
|
874
1208
|
export function randomValue(maxValue: number): number;
|
|
875
1209
|
|
|
1210
|
+
// @public
|
|
1211
|
+
export function removeEventHandler(eventName: string, callback: any, evtNamespace?: string | string[] | null): void;
|
|
1212
|
+
|
|
1213
|
+
// @public
|
|
1214
|
+
export function removeEventListeners(events: string[], listener: any, evtNamespace?: string | string[]): void;
|
|
1215
|
+
|
|
1216
|
+
// @public
|
|
1217
|
+
export function removePageHideEventListener(listener: any, evtNamespace?: string | string[] | null): void;
|
|
1218
|
+
|
|
1219
|
+
// @public
|
|
1220
|
+
export function removePageShowEventListener(listener: any, evtNamespace?: string | string[] | null): void;
|
|
1221
|
+
|
|
1222
|
+
// @public
|
|
1223
|
+
export function removePageUnloadEventListener(listener: any, evtNamespace?: string | string[]): void;
|
|
1224
|
+
|
|
876
1225
|
// @public
|
|
877
1226
|
export function safeGetCookieMgr(core: IAppInsightsCore, config?: IConfiguration): ICookieMgr;
|
|
878
1227
|
|
|
@@ -887,6 +1236,7 @@ export const enum SendRequestReason {
|
|
|
887
1236
|
NormalSchedule = 1,
|
|
888
1237
|
Resumed = 4,
|
|
889
1238
|
Retry = 5,
|
|
1239
|
+
SdkUnload = 6,
|
|
890
1240
|
SyncEvent = 3,
|
|
891
1241
|
Undefined = 0,
|
|
892
1242
|
Unload = 2
|
|
@@ -902,10 +1252,10 @@ export function setEnableEnvMocks(enabled: boolean): void;
|
|
|
902
1252
|
export function setGblPerfMgr(perfManager: IPerfManager): void;
|
|
903
1253
|
|
|
904
1254
|
// @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];
|
|
1255
|
+
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
1256
|
|
|
907
1257
|
// @public (undocumented)
|
|
908
|
-
export function sortPlugins(plugins:
|
|
1258
|
+
export function sortPlugins<T = IPlugin>(plugins: T[]): T[];
|
|
909
1259
|
|
|
910
1260
|
// @public
|
|
911
1261
|
export function strContains(value: string, search: string): boolean;
|
|
@@ -939,9 +1289,30 @@ export interface Tags {
|
|
|
939
1289
|
[key: string]: any;
|
|
940
1290
|
}
|
|
941
1291
|
|
|
1292
|
+
// @public (undocumented)
|
|
1293
|
+
export type TelemetryInitializerFunction = <T extends ITelemetryItem>(item: T) => boolean | void;
|
|
1294
|
+
|
|
1295
|
+
// @public
|
|
1296
|
+
export const enum TelemetryUnloadReason {
|
|
1297
|
+
ManualTeardown = 0,
|
|
1298
|
+
PluginReplace = 2,
|
|
1299
|
+
PluginUnload = 1,
|
|
1300
|
+
SdkUnload = 50
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
// @public
|
|
1304
|
+
export const enum TelemetryUpdateReason {
|
|
1305
|
+
PluginAdded = 16,
|
|
1306
|
+
PluginRemoved = 32,
|
|
1307
|
+
Unknown = 0
|
|
1308
|
+
}
|
|
1309
|
+
|
|
942
1310
|
// @public (undocumented)
|
|
943
1311
|
export function throwError(message: string): never;
|
|
944
1312
|
|
|
1313
|
+
// @public
|
|
1314
|
+
export function _throwInternal(logger: IDiagnosticLogger, severity: LoggingSeverity, msgId: _InternalMessageId, msg: string, properties?: Object, isUserAct?: boolean): void;
|
|
1315
|
+
|
|
945
1316
|
// @public
|
|
946
1317
|
export function toISOString(date: Date): string;
|
|
947
1318
|
|
|
@@ -951,6 +1322,12 @@ export function uaDisallowsSameSiteNone(userAgent: string): boolean;
|
|
|
951
1322
|
// @public (undocumented)
|
|
952
1323
|
export const Undefined = "undefined";
|
|
953
1324
|
|
|
1325
|
+
// @public
|
|
1326
|
+
export function unloadComponents(components: any | IUnloadableComponent[], unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void): void | boolean;
|
|
1327
|
+
|
|
1328
|
+
// @public (undocumented)
|
|
1329
|
+
export type UnloadHandler = (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
1330
|
+
|
|
954
1331
|
// @public (undocumented)
|
|
955
1332
|
export function useXDomainRequest(): boolean | undefined;
|
|
956
1333
|
|