@microsoft/applicationinsights-core-js 2.7.5-nightly.2204-03 → 2.7.5-nightly.2204-23
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 +766 -1967
- 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 +9840 -16439
- package/dist/applicationinsights-core-js.api.md +48 -425
- package/dist/applicationinsights-core-js.d.ts +123 -784
- package/dist/applicationinsights-core-js.js +766 -1967
- 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 +123 -784
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +69 -3
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +99 -496
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +21 -120
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +87 -202
- 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 +148 -7
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +14 -27
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +12 -13
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +86 -89
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -3
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +42 -37
- package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +119 -430
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +4 -30
- package/dist-esm/JavaScriptSDK/RandomHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +14 -60
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js +76 -0
- package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js.map +1 -0
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +96 -90
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +2 -1
- 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/ITelemetryItem.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +2 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +7 -12
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +3 -3
- package/src/JavaScriptSDK/AppInsightsCore.ts +101 -2
- package/src/JavaScriptSDK/BaseCore.ts +120 -696
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +31 -205
- package/src/JavaScriptSDK/ChannelController.ts +103 -242
- package/src/JavaScriptSDK/CookieMgr.ts +5 -7
- package/src/JavaScriptSDK/CoreUtils.ts +172 -8
- package/src/JavaScriptSDK/DiagnosticLogger.ts +14 -29
- package/src/JavaScriptSDK/EnvUtils.ts +12 -13
- package/src/JavaScriptSDK/HelperFuncs.ts +97 -123
- package/src/JavaScriptSDK/InstrumentHooks.ts +2 -4
- package/src/JavaScriptSDK/NotificationManager.ts +37 -34
- package/src/JavaScriptSDK/PerfManager.ts +7 -4
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +134 -543
- package/src/JavaScriptSDK/RandomHelper.ts +3 -35
- package/src/JavaScriptSDK/TelemetryHelpers.ts +21 -83
- package/src/JavaScriptSDK/TelemetryPluginChain.ts +120 -0
- package/src/JavaScriptSDK.Enums/LoggingEnums.ts +87 -184
- package/src/JavaScriptSDK.Enums/SendRequestReason.ts +0 -5
- package/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts +2 -82
- package/src/JavaScriptSDK.Interfaces/IChannelControls.ts +5 -16
- package/src/JavaScriptSDK.Interfaces/IInstrumentHooks.ts +6 -16
- package/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts +14 -94
- package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +10 -28
- package/src/JavaScriptSDK.Interfaces/ITelemetryPluginChain.ts +11 -9
- package/types/JavaScriptSDK/AppInsightsCore.d.ts +21 -0
- package/types/JavaScriptSDK/BaseCore.d.ts +3 -81
- package/types/JavaScriptSDK/BaseTelemetryPlugin.d.ts +10 -53
- package/types/JavaScriptSDK/ChannelController.d.ts +17 -16
- package/types/JavaScriptSDK/CoreUtils.d.ts +48 -1
- package/types/JavaScriptSDK/DiagnosticLogger.d.ts +0 -10
- package/types/JavaScriptSDK/HelperFuncs.d.ts +32 -33
- package/types/JavaScriptSDK/PerfManager.d.ts +1 -1
- package/types/JavaScriptSDK/ProcessTelemetryContext.d.ts +6 -69
- package/types/JavaScriptSDK/RandomHelper.d.ts +0 -6
- package/types/JavaScriptSDK/TelemetryHelpers.d.ts +3 -23
- package/types/JavaScriptSDK/TelemetryPluginChain.d.ts +32 -0
- package/types/JavaScriptSDK.Enums/LoggingEnums.d.ts +2 -91
- package/types/JavaScriptSDK.Enums/SendRequestReason.d.ts +0 -4
- package/types/JavaScriptSDK.Interfaces/IAppInsightsCore.d.ts +1 -72
- package/types/JavaScriptSDK.Interfaces/IChannelControls.d.ts +5 -16
- package/types/JavaScriptSDK.Interfaces/IInstrumentHooks.d.ts +0 -9
- package/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext.d.ts +11 -82
- package/types/JavaScriptSDK.Interfaces/ITelemetryPlugin.d.ts +8 -25
- package/types/JavaScriptSDK.Interfaces/ITelemetryPluginChain.d.ts +10 -9
- package/types/applicationinsights-core-js.d.ts +9 -18
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +0 -93
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +0 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +0 -477
- package/dist-esm/JavaScriptSDK/EventHelpers.js.map +0 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +0 -28
- package/dist-esm/JavaScriptSDK/InternalConstants.js.map +0 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +0 -81
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +0 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +0 -33
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js.map +0 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +0 -8
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js.map +0 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +0 -8
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js.map +0 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +0 -6
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js.map +0 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +0 -8
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js.map +0 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +0 -8
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js.map +0 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +0 -6
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js.map +0 -1
- package/src/JavaScriptSDK/DataCacheHelper.ts +0 -106
- package/src/JavaScriptSDK/EventHelpers.ts +0 -550
- package/src/JavaScriptSDK/InternalConstants.ts +0 -26
- package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +0 -111
- package/src/JavaScriptSDK/UnloadHandlerContainer.ts +0 -46
- package/src/JavaScriptSDK.Enums/TelemetryUnloadReason.ts +0 -27
- package/src/JavaScriptSDK.Enums/TelemetryUpdateReason.ts +0 -27
- package/src/JavaScriptSDK.Interfaces/ITelemetryInitializers.ts +0 -16
- package/src/JavaScriptSDK.Interfaces/ITelemetryUnloadState.ts +0 -10
- package/src/JavaScriptSDK.Interfaces/ITelemetryUpdateState.ts +0 -34
- package/src/JavaScriptSDK.Interfaces/IUnloadableComponent.ts +0 -17
- package/types/JavaScriptSDK/DataCacheHelper.d.ts +0 -13
- package/types/JavaScriptSDK/EventHelpers.d.ts +0 -154
- package/types/JavaScriptSDK/InternalConstants.d.ts +0 -20
- package/types/JavaScriptSDK/TelemetryInitializerPlugin.d.ts +0 -16
- package/types/JavaScriptSDK/UnloadHandlerContainer.d.ts +0 -11
- package/types/JavaScriptSDK.Enums/TelemetryUnloadReason.d.ts +0 -21
- package/types/JavaScriptSDK.Enums/TelemetryUpdateReason.d.ts +0 -20
- package/types/JavaScriptSDK.Interfaces/ITelemetryInitializers.d.ts +0 -13
- package/types/JavaScriptSDK.Interfaces/ITelemetryUnloadState.d.ts +0 -6
- package/types/JavaScriptSDK.Interfaces/ITelemetryUpdateState.d.ts +0 -22
- package/types/JavaScriptSDK.Interfaces/IUnloadableComponent.d.ts +0 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 2.7.5-nightly.2204-
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 2.7.5-nightly.2204-23
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -20,61 +20,39 @@ import { strShimObject as strObject } from '@microsoft/applicationinsights-shims
|
|
|
20
20
|
import { strShimPrototype as strPrototype } from '@microsoft/applicationinsights-shims';
|
|
21
21
|
import { strShimUndefined as strUndefined } from '@microsoft/applicationinsights-shims';
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* Get all of the registered events on the target object, this is primarily used for testing cleanup but may also be used by
|
|
25
|
-
* applications to remove their own events
|
|
26
|
-
* @param target - The EventTarget that has registered events
|
|
27
|
-
* @param eventName - [Optional] The name of the event to return the registered handlers and full name (with namespaces)
|
|
28
|
-
* @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,
|
|
29
|
-
* if the eventName also includes a namespace the namespace(s) are merged into a single namespace
|
|
30
|
-
*/
|
|
31
|
-
export declare function __getRegisteredEvents(target: any, eventName?: string, evtNamespace?: string | string[]): _IRegisteredEvents[];
|
|
32
|
-
|
|
33
23
|
/**
|
|
34
24
|
* Trys to add an event handler for the specified event to the window, body and document
|
|
35
25
|
* @param eventName {string} - The name of the event
|
|
36
26
|
* @param callback {any} - The callback function that needs to be executed for the given event
|
|
37
|
-
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
38
27
|
* @return {boolean} - true if the handler was successfully added
|
|
39
28
|
*/
|
|
40
|
-
export declare function addEventHandler(eventName: string, callback: any
|
|
29
|
+
export declare function addEventHandler(eventName: string, callback: any): boolean;
|
|
41
30
|
|
|
42
31
|
/**
|
|
43
32
|
* Bind the listener to the array of events
|
|
44
33
|
* @param events An string array of event names to bind the listener to
|
|
45
34
|
* @param listener The event callback to call when the event is triggered
|
|
46
35
|
* @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.
|
|
47
|
-
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
48
36
|
* @returns true - when at least one of the events was registered otherwise false
|
|
49
37
|
*/
|
|
50
|
-
export declare function addEventListeners(events: string[], listener: any, excludeEvents?: string[]
|
|
38
|
+
export declare function addEventListeners(events: string[], listener: any, excludeEvents?: string[]): boolean;
|
|
51
39
|
|
|
52
40
|
/**
|
|
53
|
-
* Listen to the pagehide and visibility changing to 'hidden' events
|
|
54
|
-
* an internal proxy to detect the visibility state you SHOULD use a unique namespace when if you plan to call
|
|
55
|
-
* removePageShowEventListener as the remove ignores the listener argument for the 'visibilitychange' event.
|
|
41
|
+
* Listen to the pagehide and visibility changing to 'hidden' events
|
|
56
42
|
* @param listener - The event callback to call when a page hide event is triggered
|
|
57
43
|
* @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.
|
|
58
|
-
* @param evtNamespace - [Optional] A Namespace to append to the event listeners so they can be uniquely identified and removed
|
|
59
|
-
* based on this namespace. This call also adds an additional unique "pageshow" namespace to the events
|
|
60
|
-
* so that only the matching "removePageHideEventListener" can remove these events.
|
|
61
44
|
* Suggestion: pass as true if you are also calling addPageUnloadEventListener as that also hooks pagehide
|
|
62
45
|
* @returns true - when at least one of the events was registered otherwise false
|
|
63
46
|
*/
|
|
64
|
-
export declare function addPageHideEventListener(listener: any, excludeEvents?: string[]
|
|
47
|
+
export declare function addPageHideEventListener(listener: any, excludeEvents?: string[]): boolean;
|
|
65
48
|
|
|
66
49
|
/**
|
|
67
|
-
* Listen to the pageshow and visibility changing to 'visible' events
|
|
68
|
-
* an internal proxy to detect the visibility state you SHOULD use a unique namespace when if you plan to call
|
|
69
|
-
* removePageShowEventListener as the remove ignores the listener argument for the 'visibilitychange' event.
|
|
50
|
+
* Listen to the pageshow and visibility changing to 'visible' events
|
|
70
51
|
* @param listener - The event callback to call when a page is show event is triggered
|
|
71
52
|
* @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.
|
|
72
|
-
* @param evtNamespace - [Optional/Recommended] A Namespace to append to the event listeners so they can be uniquely
|
|
73
|
-
* identified and removed based on this namespace. This call also adds an additional unique "pageshow" namespace to the events
|
|
74
|
-
* so that only the matching "removePageShowEventListener" can remove these events.
|
|
75
53
|
* @returns true - when at least one of the events was registered otherwise false
|
|
76
54
|
*/
|
|
77
|
-
export declare function addPageShowEventListener(listener: any, excludeEvents?: string[]
|
|
55
|
+
export declare function addPageShowEventListener(listener: any, excludeEvents?: string[]): boolean;
|
|
78
56
|
|
|
79
57
|
/**
|
|
80
58
|
* Listen to the 'beforeunload', 'unload' and 'pagehide' events which indicates a page unload is occurring,
|
|
@@ -84,15 +62,34 @@ export declare function addPageShowEventListener(listener: any, excludeEvents?:
|
|
|
84
62
|
* need to listen to the 'addPageHideEventListener' and 'addPageShowEventListener' events.
|
|
85
63
|
* @param listener - The event callback to call when a page unload event is triggered
|
|
86
64
|
* @param excludeEvents - [Optional] An array of events that should not be hooked, unless no other events can be.
|
|
87
|
-
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
88
65
|
* @returns true - when at least one of the events was registered otherwise false
|
|
89
66
|
*/
|
|
90
|
-
export declare function addPageUnloadEventListener(listener: any, excludeEvents?: string[]
|
|
67
|
+
export declare function addPageUnloadEventListener(listener: any, excludeEvents?: string[]): boolean;
|
|
91
68
|
|
|
92
69
|
export declare class AppInsightsCore extends BaseCore implements IAppInsightsCore {
|
|
93
70
|
constructor();
|
|
94
71
|
initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
|
|
95
72
|
track(telemetryItem: ITelemetryItem): void;
|
|
73
|
+
/**
|
|
74
|
+
* Adds a notification listener. The SDK calls methods on the listener when an appropriate notification is raised.
|
|
75
|
+
* The added plugins must raise notifications. If the plugins do not implement the notifications, then no methods will be
|
|
76
|
+
* called.
|
|
77
|
+
* @param {INotificationListener} listener - An INotificationListener object.
|
|
78
|
+
*/
|
|
79
|
+
addNotificationListener(listener: INotificationListener): void;
|
|
80
|
+
/**
|
|
81
|
+
* Removes all instances of the listener.
|
|
82
|
+
* @param {INotificationListener} listener - INotificationListener to remove.
|
|
83
|
+
*/
|
|
84
|
+
removeNotificationListener(listener: INotificationListener): void;
|
|
85
|
+
/**
|
|
86
|
+
* Periodically check logger.queue for
|
|
87
|
+
*/
|
|
88
|
+
pollInternalLogs(eventName?: string): number;
|
|
89
|
+
/**
|
|
90
|
+
* Periodically check logger.queue for
|
|
91
|
+
*/
|
|
92
|
+
stopPollingInternalLogs(): void;
|
|
96
93
|
}
|
|
97
94
|
|
|
98
95
|
export declare function areCookiesSupported(logger?: IDiagnosticLogger): any;
|
|
@@ -105,7 +102,7 @@ export declare function areCookiesSupported(logger?: IDiagnosticLogger): any;
|
|
|
105
102
|
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. It can return -1 to break out of the loop
|
|
106
103
|
* @param thisArg [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
107
104
|
*/
|
|
108
|
-
export declare function arrForEach<T
|
|
105
|
+
export declare function arrForEach<T>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => void | number, thisArg?: any): void;
|
|
109
106
|
|
|
110
107
|
/**
|
|
111
108
|
* Returns the index of the first occurrence of a value in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
@@ -140,7 +137,7 @@ export declare function arrReduce<T, R>(arr: T[], callbackfn: (previousValue: T
|
|
|
140
137
|
/**
|
|
141
138
|
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
142
139
|
* @param obj Object to add the event too.
|
|
143
|
-
* @param eventNameWithoutOn String that specifies any of the standard DHTML Events without "on" prefix
|
|
140
|
+
* @param eventNameWithoutOn String that specifies any of the standard DHTML Events without "on" prefix
|
|
144
141
|
* @param handlerRef Pointer that specifies the function to call when event fires
|
|
145
142
|
* @param useCapture [Optional] Defaults to false
|
|
146
143
|
* @returns True if the function was bound successfully to the event, otherwise false
|
|
@@ -159,18 +156,6 @@ export declare class BaseCore implements IAppInsightsCore {
|
|
|
159
156
|
track(telemetryItem: ITelemetryItem): void;
|
|
160
157
|
getProcessTelContext(): IProcessTelemetryContext;
|
|
161
158
|
getNotifyMgr(): INotificationManager;
|
|
162
|
-
/**
|
|
163
|
-
* Adds a notification listener. The SDK calls methods on the listener when an appropriate notification is raised.
|
|
164
|
-
* The added plugins must raise notifications. If the plugins do not implement the notifications, then no methods will be
|
|
165
|
-
* called.
|
|
166
|
-
* @param {INotificationListener} listener - An INotificationListener object.
|
|
167
|
-
*/
|
|
168
|
-
addNotificationListener(listener: INotificationListener): void;
|
|
169
|
-
/**
|
|
170
|
-
* Removes all instances of the listener.
|
|
171
|
-
* @param {INotificationListener} listener - INotificationListener to remove.
|
|
172
|
-
*/
|
|
173
|
-
removeNotificationListener(listener: INotificationListener): void;
|
|
174
159
|
/**
|
|
175
160
|
* Get the current cookie manager for this instance
|
|
176
161
|
*/
|
|
@@ -183,67 +168,7 @@ export declare class BaseCore implements IAppInsightsCore {
|
|
|
183
168
|
getPerfMgr(): IPerfManager;
|
|
184
169
|
setPerfMgr(perfMgr: IPerfManager): void;
|
|
185
170
|
eventCnt(): number;
|
|
186
|
-
/**
|
|
187
|
-
* Periodically check logger.queue for
|
|
188
|
-
*/
|
|
189
|
-
pollInternalLogs(eventName?: string): number;
|
|
190
|
-
/**
|
|
191
|
-
* Periodically check logger.queue for
|
|
192
|
-
*/
|
|
193
|
-
stopPollingInternalLogs(): void;
|
|
194
|
-
/**
|
|
195
|
-
* Add a telemetry processor to decorate or drop telemetry events.
|
|
196
|
-
* @param telemetryInitializer - The Telemetry Initializer function
|
|
197
|
-
* @returns - A ITelemetryInitializerHandler to enable the initializer to be removed
|
|
198
|
-
*/
|
|
199
|
-
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
|
|
200
|
-
/**
|
|
201
|
-
* Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered
|
|
202
|
-
* to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous
|
|
203
|
-
* unload call return `true` stating that all plugins reported that they also unloaded, the recommended
|
|
204
|
-
* approach is to create a new instance and initialize that instance.
|
|
205
|
-
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
206
|
-
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
207
|
-
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
208
|
-
* @param unloadComplete - An optional callback that will be called once the unload has completed
|
|
209
|
-
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the unload. Defaults to 5 seconds.
|
|
210
|
-
*/
|
|
211
|
-
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void;
|
|
212
|
-
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
213
|
-
/**
|
|
214
|
-
* Add a new plugin to the installation
|
|
215
|
-
* @param plugin - The new plugin to add
|
|
216
|
-
* @param replaceExisting - should any existing plugin be replaced, default is false
|
|
217
|
-
* @param doAsync - Should the add be performed asynchronously
|
|
218
|
-
* @param addCb - [Optional] callback to call after the plugin has been added
|
|
219
|
-
*/
|
|
220
|
-
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
|
|
221
|
-
/**
|
|
222
|
-
* Returns the unique event namespace that should be used
|
|
223
|
-
*/
|
|
224
|
-
evtNamespace(): string;
|
|
225
|
-
/**
|
|
226
|
-
* Add an unload handler that will be called when the SDK is being unloaded
|
|
227
|
-
* @param handler - the handler
|
|
228
|
-
*/
|
|
229
|
-
addUnloadCb(handler: UnloadHandler): void;
|
|
230
|
-
/**
|
|
231
|
-
* Flush and send any batched / cached data immediately
|
|
232
|
-
* @param async - send data asynchronously when true (defaults to true)
|
|
233
|
-
* @param callBack - if specified, notify caller when send is complete, the channel should return true to indicate to the caller that it will be called.
|
|
234
|
-
* If the caller doesn't return true the caller should assume that it may never be called.
|
|
235
|
-
* @param sendReason - specify the reason that you are calling "flush" defaults to ManualFlush (1) if not specified
|
|
236
|
-
* @returns - true if the callback will be return after the flush is complete otherwise the caller should assume that any provided callback will never be called
|
|
237
|
-
*/
|
|
238
|
-
flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): void;
|
|
239
171
|
protected releaseQueue(): void;
|
|
240
|
-
/**
|
|
241
|
-
* Hook for Core extensions to allow them to update their own configuration before updating all of the plugins.
|
|
242
|
-
* @param updateCtx - The plugin update context
|
|
243
|
-
* @param updateState - The Update State
|
|
244
|
-
* @returns boolean - True means the extension class will call updateState otherwise the Core will
|
|
245
|
-
*/
|
|
246
|
-
protected _updateHook?(updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState): void | boolean;
|
|
247
172
|
}
|
|
248
173
|
|
|
249
174
|
/**
|
|
@@ -252,13 +177,6 @@ export declare class BaseCore implements IAppInsightsCore {
|
|
|
252
177
|
* implementation so that new default implementations can be added without breaking all plugins.
|
|
253
178
|
*/
|
|
254
179
|
export declare abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
|
|
255
|
-
identifier: string;
|
|
256
|
-
version?: string;
|
|
257
|
-
/**
|
|
258
|
-
* Holds the core instance that was used during initialization
|
|
259
|
-
*/
|
|
260
|
-
core: IAppInsightsCore;
|
|
261
|
-
priority: number;
|
|
262
180
|
/**
|
|
263
181
|
* Call back for telemetry processing before it it is sent
|
|
264
182
|
* @param env - This is the current event being reported
|
|
@@ -280,6 +198,13 @@ export declare abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
|
|
|
280
198
|
* Returns whether the plugin has been initialized
|
|
281
199
|
*/
|
|
282
200
|
isInitialized: () => boolean;
|
|
201
|
+
identifier: string;
|
|
202
|
+
version?: string;
|
|
203
|
+
/**
|
|
204
|
+
* Holds the core instance that was used during initialization
|
|
205
|
+
*/
|
|
206
|
+
core: IAppInsightsCore;
|
|
207
|
+
priority: number;
|
|
283
208
|
/**
|
|
284
209
|
* Helper to return the current IProcessTelemetryContext, if the passed argument exists this just
|
|
285
210
|
* returns that value (helps with minification for callers), otherwise it will return the configured
|
|
@@ -292,51 +217,12 @@ export declare abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
|
|
|
292
217
|
*/
|
|
293
218
|
protected setInitialized: (isInitialized: boolean) => void;
|
|
294
219
|
/**
|
|
295
|
-
*
|
|
296
|
-
* finishes it's removal.
|
|
297
|
-
* @param unloadCtx - This is the context that should be used during unloading.
|
|
298
|
-
* @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
|
|
299
|
-
* @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.
|
|
300
|
-
* @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
|
|
220
|
+
* Internal helper to initialize the instance
|
|
301
221
|
*/
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Extension hook to allow implementations to perform some additional update operations before the BaseTelemetryPlugin finishes it's removal
|
|
305
|
-
* @param updateCtx - This is the context that should be used during updating.
|
|
306
|
-
* @param updateState - The details / state of the update process, it holds details like the current and previous configuration.
|
|
307
|
-
* @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async update operations.
|
|
308
|
-
* @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
|
|
309
|
-
*/
|
|
310
|
-
protected _doUpdate?: (updateCtx?: IProcessTelemetryUpdateContext, updateState?: ITelemetryUpdateState, asyncCallback?: () => void) => void | boolean;
|
|
222
|
+
private _baseTelInit;
|
|
311
223
|
constructor();
|
|
312
224
|
initialize(config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
|
|
313
|
-
/**
|
|
314
|
-
* Tear down the plugin and remove any hooked value, the plugin should be removed so that it is no longer initialized and
|
|
315
|
-
* therefore could be re-initialized after being torn down. The plugin should ensure that once this has been called any further
|
|
316
|
-
* processTelemetry calls are ignored and it just calls the processNext() with the provided context.
|
|
317
|
-
* @param unloadCtx - This is the context that should be used during unloading.
|
|
318
|
-
* @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
|
|
319
|
-
* @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
|
|
320
|
-
*/
|
|
321
|
-
teardown(unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState): void | boolean;
|
|
322
225
|
abstract processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
323
|
-
/**
|
|
324
|
-
* The the plugin should re-evaluate configuration and update any cached configuration settings.
|
|
325
|
-
* @param updateCtx - This is the context that should be used during updating.
|
|
326
|
-
* @param updateState - The details / state of the update process, it holds details like the current and previous configuration.
|
|
327
|
-
* @returns boolean - true if the plugin has or will call updateCtx.processNext(), this allows the plugin to perform any asynchronous operations.
|
|
328
|
-
*/
|
|
329
|
-
update(updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState): void | boolean;
|
|
330
|
-
/**
|
|
331
|
-
* Add an unload handler that will be called when the SDK is being unloaded
|
|
332
|
-
* @param handler - the handler
|
|
333
|
-
*/
|
|
334
|
-
protected _addUnloadCb(handler: UnloadHandler): void;
|
|
335
|
-
/**
|
|
336
|
-
* Add this hook so that it is automatically removed during unloading
|
|
337
|
-
* @param hooks - The single hook or an array of IInstrumentHook objects
|
|
338
|
-
*/
|
|
339
|
-
protected _addHook(hooks: IInstrumentHook | IInstrumentHook[]): void;
|
|
340
226
|
}
|
|
341
227
|
|
|
342
228
|
/**
|
|
@@ -362,29 +248,6 @@ export declare function createClassFromInterface<T>(defaults?: T): new () => T;
|
|
|
362
248
|
|
|
363
249
|
export declare function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
364
250
|
|
|
365
|
-
/**
|
|
366
|
-
* Create an enum style object which has both the key => value and value => key mappings
|
|
367
|
-
* @param values - The values to populate on the new object
|
|
368
|
-
* @returns
|
|
369
|
-
*/
|
|
370
|
-
export declare function createEnumStyle<T>(values: T): T;
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* Creates a new Telemetry Item context with the current config, core and plugin execution chain
|
|
374
|
-
* @param plugins - The plugin instances that will be executed
|
|
375
|
-
* @param config - The current config
|
|
376
|
-
* @param core - The current core instance
|
|
377
|
-
* @param startAt - Identifies the next plugin to execute, if null there is no "next" plugin and if undefined it should assume the start of the chain
|
|
378
|
-
*/
|
|
379
|
-
export declare function createProcessTelemetryContext(telemetryChain: ITelemetryPluginChain | null, config: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin): IProcessTelemetryContext;
|
|
380
|
-
|
|
381
|
-
export declare function createUniqueNamespace(name: string, includeVersion?: boolean): string;
|
|
382
|
-
|
|
383
|
-
export declare function createUnloadHandlerContainer(): {
|
|
384
|
-
add: (handler: UnloadHandler) => void;
|
|
385
|
-
run: (unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
386
|
-
};
|
|
387
|
-
|
|
388
251
|
/**
|
|
389
252
|
* Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)
|
|
390
253
|
* https://caniuse.com/#search=Date.now
|
|
@@ -401,11 +264,8 @@ export declare function deleteCookie(logger: IDiagnosticLogger, name: string): b
|
|
|
401
264
|
/**
|
|
402
265
|
* Removes an event handler for the specified event
|
|
403
266
|
* @param Object to remove the event from
|
|
404
|
-
* @param eventNameWithoutOn {string} - The name of the event
|
|
405
|
-
*
|
|
406
|
-
* @param handlerRef {any} - The callback function that needs to be removed from the given event, when using a
|
|
407
|
-
* namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers
|
|
408
|
-
* otherwise this will only remove events with this specific handler.
|
|
267
|
+
* @param eventNameWithoutOn {string} - The name of the event
|
|
268
|
+
* @param handlerRef {any} - The callback function that needs to be executed for the given event
|
|
409
269
|
* @param useCapture [Optional] Defaults to false
|
|
410
270
|
*/
|
|
411
271
|
export declare function detachEvent(obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture?: boolean): void;
|
|
@@ -486,131 +346,8 @@ export declare function doPerf<T>(mgrSource: IPerfManagerProvider | IPerfManager
|
|
|
486
346
|
*/
|
|
487
347
|
export declare function dumpObj(object: any): string;
|
|
488
348
|
|
|
489
|
-
export declare const enum _eInternalMessageId {
|
|
490
|
-
BrowserDoesNotSupportLocalStorage = 0,
|
|
491
|
-
BrowserCannotReadLocalStorage = 1,
|
|
492
|
-
BrowserCannotReadSessionStorage = 2,
|
|
493
|
-
BrowserCannotWriteLocalStorage = 3,
|
|
494
|
-
BrowserCannotWriteSessionStorage = 4,
|
|
495
|
-
BrowserFailedRemovalFromLocalStorage = 5,
|
|
496
|
-
BrowserFailedRemovalFromSessionStorage = 6,
|
|
497
|
-
CannotSendEmptyTelemetry = 7,
|
|
498
|
-
ClientPerformanceMathError = 8,
|
|
499
|
-
ErrorParsingAISessionCookie = 9,
|
|
500
|
-
ErrorPVCalc = 10,
|
|
501
|
-
ExceptionWhileLoggingError = 11,
|
|
502
|
-
FailedAddingTelemetryToBuffer = 12,
|
|
503
|
-
FailedMonitorAjaxAbort = 13,
|
|
504
|
-
FailedMonitorAjaxDur = 14,
|
|
505
|
-
FailedMonitorAjaxOpen = 15,
|
|
506
|
-
FailedMonitorAjaxRSC = 16,
|
|
507
|
-
FailedMonitorAjaxSend = 17,
|
|
508
|
-
FailedMonitorAjaxGetCorrelationHeader = 18,
|
|
509
|
-
FailedToAddHandlerForOnBeforeUnload = 19,
|
|
510
|
-
FailedToSendQueuedTelemetry = 20,
|
|
511
|
-
FailedToReportDataLoss = 21,
|
|
512
|
-
FlushFailed = 22,
|
|
513
|
-
MessageLimitPerPVExceeded = 23,
|
|
514
|
-
MissingRequiredFieldSpecification = 24,
|
|
515
|
-
NavigationTimingNotSupported = 25,
|
|
516
|
-
OnError = 26,
|
|
517
|
-
SessionRenewalDateIsZero = 27,
|
|
518
|
-
SenderNotInitialized = 28,
|
|
519
|
-
StartTrackEventFailed = 29,
|
|
520
|
-
StopTrackEventFailed = 30,
|
|
521
|
-
StartTrackFailed = 31,
|
|
522
|
-
StopTrackFailed = 32,
|
|
523
|
-
TelemetrySampledAndNotSent = 33,
|
|
524
|
-
TrackEventFailed = 34,
|
|
525
|
-
TrackExceptionFailed = 35,
|
|
526
|
-
TrackMetricFailed = 36,
|
|
527
|
-
TrackPVFailed = 37,
|
|
528
|
-
TrackPVFailedCalc = 38,
|
|
529
|
-
TrackTraceFailed = 39,
|
|
530
|
-
TransmissionFailed = 40,
|
|
531
|
-
FailedToSetStorageBuffer = 41,
|
|
532
|
-
FailedToRestoreStorageBuffer = 42,
|
|
533
|
-
InvalidBackendResponse = 43,
|
|
534
|
-
FailedToFixDepricatedValues = 44,
|
|
535
|
-
InvalidDurationValue = 45,
|
|
536
|
-
TelemetryEnvelopeInvalid = 46,
|
|
537
|
-
CreateEnvelopeError = 47,
|
|
538
|
-
CannotSerializeObject = 48,
|
|
539
|
-
CannotSerializeObjectNonSerializable = 49,
|
|
540
|
-
CircularReferenceDetected = 50,
|
|
541
|
-
ClearAuthContextFailed = 51,
|
|
542
|
-
ExceptionTruncated = 52,
|
|
543
|
-
IllegalCharsInName = 53,
|
|
544
|
-
ItemNotInArray = 54,
|
|
545
|
-
MaxAjaxPerPVExceeded = 55,
|
|
546
|
-
MessageTruncated = 56,
|
|
547
|
-
NameTooLong = 57,
|
|
548
|
-
SampleRateOutOfRange = 58,
|
|
549
|
-
SetAuthContextFailed = 59,
|
|
550
|
-
SetAuthContextFailedAccountName = 60,
|
|
551
|
-
StringValueTooLong = 61,
|
|
552
|
-
StartCalledMoreThanOnce = 62,
|
|
553
|
-
StopCalledWithoutStart = 63,
|
|
554
|
-
TelemetryInitializerFailed = 64,
|
|
555
|
-
TrackArgumentsNotSpecified = 65,
|
|
556
|
-
UrlTooLong = 66,
|
|
557
|
-
SessionStorageBufferFull = 67,
|
|
558
|
-
CannotAccessCookie = 68,
|
|
559
|
-
IdTooLong = 69,
|
|
560
|
-
InvalidEvent = 70,
|
|
561
|
-
FailedMonitorAjaxSetRequestHeader = 71,
|
|
562
|
-
SendBrowserInfoOnUserInit = 72,
|
|
563
|
-
PluginException = 73,
|
|
564
|
-
NotificationException = 74,
|
|
565
|
-
SnippetScriptLoadFailure = 99,
|
|
566
|
-
InvalidInstrumentationKey = 100,
|
|
567
|
-
CannotParseAiBlobValue = 101,
|
|
568
|
-
InvalidContentBlob = 102,
|
|
569
|
-
TrackPageActionEventFailed = 103,
|
|
570
|
-
FailedAddingCustomDefinedRequestContext = 104,
|
|
571
|
-
InMemoryStorageBufferFull = 105
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
export declare const enum eLoggingSeverity {
|
|
575
|
-
/**
|
|
576
|
-
* Error will be sent as internal telemetry
|
|
577
|
-
*/
|
|
578
|
-
CRITICAL = 1,
|
|
579
|
-
/**
|
|
580
|
-
* Error will NOT be sent as internal telemetry, and will only be shown in browser console
|
|
581
|
-
*/
|
|
582
|
-
WARNING = 2
|
|
583
|
-
}
|
|
584
|
-
|
|
585
349
|
export declare const EventHelper: IEventHelper;
|
|
586
350
|
|
|
587
|
-
/**
|
|
588
|
-
* Removes an event handler for the specified event
|
|
589
|
-
* @param Object to remove the event from
|
|
590
|
-
* @param eventName {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
591
|
-
* such as "click", "click.mynamespace" or ".mynamespace"
|
|
592
|
-
* @param handlerRef {any} - The callback function that needs to be removed from the given event, when using a
|
|
593
|
-
* namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers
|
|
594
|
-
* otherwise this will only remove events with this specific handler.
|
|
595
|
-
* @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,
|
|
596
|
-
* if the eventName also includes a namespace the namespace(s) are merged into a single namespace
|
|
597
|
-
* @param useCapture [Optional] Defaults to false
|
|
598
|
-
*/
|
|
599
|
-
export declare function eventOff<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): void;
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
603
|
-
* @param obj Object to add the event too.
|
|
604
|
-
* @param eventName String that specifies any of the standard DHTML Events without "on" prefix, if may also include an optional (dot "." prefixed)
|
|
605
|
-
* namespaces "click" "click.mynamespace" in addition to specific namespaces.
|
|
606
|
-
* @param handlerRef Pointer that specifies the function to call when event fires
|
|
607
|
-
* @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,
|
|
608
|
-
* if the eventName also includes a namespace the namespace(s) are merged into a single namespace
|
|
609
|
-
* @param useCapture [Optional] Defaults to false
|
|
610
|
-
* @returns True if the function was bound successfully to the event, otherwise false
|
|
611
|
-
*/
|
|
612
|
-
export declare function eventOn<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): boolean;
|
|
613
|
-
|
|
614
351
|
/**
|
|
615
352
|
* The EventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
616
353
|
*/
|
|
@@ -680,12 +417,6 @@ export declare function getDocument(): Document | null;
|
|
|
680
417
|
*/
|
|
681
418
|
export declare function getExceptionName(object: any): string;
|
|
682
419
|
|
|
683
|
-
export declare const enum GetExtCfgMergeType {
|
|
684
|
-
None = 0,
|
|
685
|
-
MergeDefaultOnly = 1,
|
|
686
|
-
MergeDefaultFromRootOrDefault = 2
|
|
687
|
-
}
|
|
688
|
-
|
|
689
420
|
/**
|
|
690
421
|
* Get the current global performance manager that will be used with no performance manager is supplied.
|
|
691
422
|
* @returns - The current default manager
|
|
@@ -844,123 +575,12 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
844
575
|
* @param {INotificationListener} listener - INotificationListener to remove.
|
|
845
576
|
*/
|
|
846
577
|
removeNotificationListener?(listener: INotificationListener): void;
|
|
847
|
-
/**
|
|
848
|
-
* Add a telemetry processor to decorate or drop telemetry events.
|
|
849
|
-
* @param telemetryInitializer - The Telemetry Initializer function
|
|
850
|
-
* @returns - A ITelemetryInitializerHandler to enable the initializer to be removed
|
|
851
|
-
*/
|
|
852
|
-
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
|
|
853
578
|
pollInternalLogs?(eventName?: string): number;
|
|
854
579
|
stopPollingInternalLogs?(): void;
|
|
855
580
|
/**
|
|
856
581
|
* Return a new instance of the IProcessTelemetryContext for processing events
|
|
857
582
|
*/
|
|
858
583
|
getProcessTelContext(): IProcessTelemetryContext;
|
|
859
|
-
/**
|
|
860
|
-
* Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered
|
|
861
|
-
* to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous
|
|
862
|
-
* unload call return `true` stating that all plugins reported that they also unloaded, the recommended
|
|
863
|
-
* approach is to create a new instance and initialize that instance.
|
|
864
|
-
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
865
|
-
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
866
|
-
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
867
|
-
* @param unloadComplete - An optional callback that will be called once the unload has completed
|
|
868
|
-
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the unload. Defaults to 5 seconds.
|
|
869
|
-
*/
|
|
870
|
-
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void;
|
|
871
|
-
/**
|
|
872
|
-
* Find and return the (first) plugin with the specified identifier if present
|
|
873
|
-
* @param pluginIdentifier
|
|
874
|
-
*/
|
|
875
|
-
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
876
|
-
/**
|
|
877
|
-
* Add a new plugin to the installation
|
|
878
|
-
* @param plugin - The new plugin to add
|
|
879
|
-
* @param replaceExisting - should any existing plugin be replaced, default is false
|
|
880
|
-
* @param doAsync - Should the add be performed asynchronously
|
|
881
|
-
* @param addCb - [Optional] callback to call after the plugin has been added
|
|
882
|
-
*/
|
|
883
|
-
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
|
|
884
|
-
/**
|
|
885
|
-
* Returns the unique event namespace that should be used when registering events
|
|
886
|
-
*/
|
|
887
|
-
evtNamespace(): string;
|
|
888
|
-
/**
|
|
889
|
-
* Add a handler that will be called when the SDK is being unloaded
|
|
890
|
-
* @param handler - the handler
|
|
891
|
-
*/
|
|
892
|
-
addUnloadCb(handler: UnloadHandler): void;
|
|
893
|
-
/**
|
|
894
|
-
* Flush and send any batched / cached data immediately
|
|
895
|
-
* @param async - send data asynchronously when true (defaults to true)
|
|
896
|
-
* @param callBack - if specified, notify caller when send is complete, the channel should return true to indicate to the caller that it will be called.
|
|
897
|
-
* If the caller doesn't return true the caller should assume that it may never be called.
|
|
898
|
-
* @param sendReason - specify the reason that you are calling "flush" defaults to ManualFlush (1) if not specified
|
|
899
|
-
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the unload. Defaults to 5 seconds.
|
|
900
|
-
* @returns - true if the callback will be return after the flush is complete otherwise the caller should assume that any provided callback will never be called
|
|
901
|
-
*/
|
|
902
|
-
flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason, cbTimeout?: number): boolean | void;
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
export declare interface IBaseProcessingContext {
|
|
906
|
-
/**
|
|
907
|
-
* The current core instance for the request
|
|
908
|
-
*/
|
|
909
|
-
core: () => IAppInsightsCore;
|
|
910
|
-
/**
|
|
911
|
-
* THe current diagnostic logger for the request
|
|
912
|
-
*/
|
|
913
|
-
diagLog: () => IDiagnosticLogger;
|
|
914
|
-
/**
|
|
915
|
-
* Gets the current core config instance
|
|
916
|
-
*/
|
|
917
|
-
getCfg: () => IConfiguration;
|
|
918
|
-
/**
|
|
919
|
-
* Gets the named extension config
|
|
920
|
-
*/
|
|
921
|
-
getExtCfg: <T>(identifier: string, defaultValue?: T | any, mergeDefault?: GetExtCfgMergeType) => T;
|
|
922
|
-
/**
|
|
923
|
-
* Gets the named config from either the named identifier extension or core config if neither exist then the
|
|
924
|
-
* default value is returned
|
|
925
|
-
* @param identifier The named extension identifier
|
|
926
|
-
* @param field The config field name
|
|
927
|
-
* @param defaultValue The default value to return if no defined config exists
|
|
928
|
-
*/
|
|
929
|
-
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean | string[] | RegExp[] | Function) => number | string | boolean | string[] | RegExp[] | Function;
|
|
930
|
-
/**
|
|
931
|
-
* Helper to allow plugins to check and possibly shortcut executing code only
|
|
932
|
-
* required if there is a nextPlugin
|
|
933
|
-
*/
|
|
934
|
-
hasNext: () => boolean;
|
|
935
|
-
/**
|
|
936
|
-
* Returns the next configured plugin proxy
|
|
937
|
-
*/
|
|
938
|
-
getNext: () => ITelemetryPluginChain;
|
|
939
|
-
/**
|
|
940
|
-
* Helper to set the next plugin proxy
|
|
941
|
-
*/
|
|
942
|
-
setNext: (nextCtx: ITelemetryPluginChain) => void;
|
|
943
|
-
/**
|
|
944
|
-
* Synchronously iterate over the context chain running the callback for each plugin, once
|
|
945
|
-
* every plugin has been executed via the callback, any associated onComplete will be called.
|
|
946
|
-
* @param callback - The function call for each plugin in the context chain
|
|
947
|
-
*/
|
|
948
|
-
iterate: <T extends ITelemetryPlugin = ITelemetryPlugin>(callback: (plugin: T) => void) => void;
|
|
949
|
-
/**
|
|
950
|
-
* Set the function to call when the current chain has executed all processNext or unloadNext items.
|
|
951
|
-
* @param onComplete - The onComplete to call
|
|
952
|
-
* @param that - The "this" value to use for the onComplete call, if not provided or undefined defaults to the current context
|
|
953
|
-
* @param args - Any additional arguments to pass to the onComplete function
|
|
954
|
-
*/
|
|
955
|
-
onComplete: (onComplete: () => void, that?: any, ...args: any[]) => void;
|
|
956
|
-
/**
|
|
957
|
-
* Create a new context using the core and config from the current instance, returns a new instance of the same type
|
|
958
|
-
* @param plugins - The execution order to process the plugins, if null or not supplied
|
|
959
|
-
* then the current execution order will be copied.
|
|
960
|
-
* @param startAt - The plugin to start processing from, if missing from the execution
|
|
961
|
-
* order then the next plugin will be NOT set.
|
|
962
|
-
*/
|
|
963
|
-
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IBaseProcessingContext;
|
|
964
584
|
}
|
|
965
585
|
|
|
966
586
|
/**
|
|
@@ -976,23 +596,15 @@ export declare interface IChannelControls extends ITelemetryPlugin {
|
|
|
976
596
|
*/
|
|
977
597
|
resume(): void;
|
|
978
598
|
/**
|
|
979
|
-
* Tear down
|
|
980
|
-
* therefore could be re-initialized after being torn down. The plugin should ensure that once this has been called any further
|
|
981
|
-
* processTelemetry calls are ignored and it just calls the processNext() with the provided context.
|
|
982
|
-
* @param unloadCtx - This is the context that should be used during unloading.
|
|
983
|
-
* @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
|
|
984
|
-
* @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
|
|
599
|
+
* Tear down transmission pipeline
|
|
985
600
|
*/
|
|
986
|
-
teardown
|
|
601
|
+
teardown(): void;
|
|
987
602
|
/**
|
|
988
603
|
* Flush to send data immediately; channel should default to sending data asynchronously
|
|
989
|
-
* @param async
|
|
990
|
-
* @param callBack
|
|
991
|
-
* If the caller doesn't return true the caller should assume that it may never be called.
|
|
992
|
-
* @param sendReason - specify the reason that you are calling "flush" defaults to ManualFlush (1) if not specified
|
|
993
|
-
* @returns - true if the callback will be return after the flush is complete otherwise the caller should assume that any provided callback will never be called
|
|
604
|
+
* @param async: send data asynchronously when true
|
|
605
|
+
* @param callBack: if specified, notify caller when send is complete
|
|
994
606
|
*/
|
|
995
|
-
flush(async: boolean, callBack?: (
|
|
607
|
+
flush(async: boolean, callBack?: () => void): void;
|
|
996
608
|
}
|
|
997
609
|
|
|
998
610
|
/**
|
|
@@ -1352,7 +964,7 @@ export declare interface ICoreUtils {
|
|
|
1352
964
|
* @param callback {any} - The callback function that needs to be executed for the given event
|
|
1353
965
|
* @return {boolean} - true if the handler was successfully added
|
|
1354
966
|
*/
|
|
1355
|
-
addEventHandler: (eventName: string, callback: any
|
|
967
|
+
addEventHandler: (eventName: string, callback: any) => boolean;
|
|
1356
968
|
/**
|
|
1357
969
|
* Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)
|
|
1358
970
|
* https://caniuse.com/#search=Date.now
|
|
@@ -1537,10 +1149,6 @@ export declare interface IInstrumentCallDetails {
|
|
|
1537
1149
|
* The error (exception) which occurred while executing the original method
|
|
1538
1150
|
*/
|
|
1539
1151
|
err?: Error;
|
|
1540
|
-
/**
|
|
1541
|
-
* The Event object from (window.event) at the start of the original call
|
|
1542
|
-
*/
|
|
1543
|
-
evt?: Event;
|
|
1544
1152
|
}
|
|
1545
1153
|
|
|
1546
1154
|
/**
|
|
@@ -1567,11 +1175,6 @@ export declare interface IInstrumentHooks {
|
|
|
1567
1175
|
* You must always supply the error callback
|
|
1568
1176
|
*/
|
|
1569
1177
|
export declare interface IInstrumentHooksCallbacks {
|
|
1570
|
-
/**
|
|
1571
|
-
* [Optional] Namespace details (same as the namespace used for events), useful for debugging and testing to
|
|
1572
|
-
* identify the source of the instrumented hooks
|
|
1573
|
-
*/
|
|
1574
|
-
ns?: string | string[];
|
|
1575
1178
|
/**
|
|
1576
1179
|
* The hook callback to call before the original function is called
|
|
1577
1180
|
*/
|
|
@@ -1591,24 +1194,6 @@ export declare interface IInstrumentHooksCallbacks {
|
|
|
1591
1194
|
fnErr?: InstrumentorHooksCallback;
|
|
1592
1195
|
}
|
|
1593
1196
|
|
|
1594
|
-
export declare interface ILoadedPlugin<T extends IPlugin> {
|
|
1595
|
-
plugin: T;
|
|
1596
|
-
/**
|
|
1597
|
-
* Identifies whether the plugin is enabled and can process events. This is slightly different from isInitialized as the plugin may be initialized but disabled
|
|
1598
|
-
* via the setEnabled() or it may be a shared plugin which has had it's teardown function called from another instance..
|
|
1599
|
-
* @returns boolean = true if the plugin is in a state where it is operational.
|
|
1600
|
-
*/
|
|
1601
|
-
isEnabled: () => boolean;
|
|
1602
|
-
/**
|
|
1603
|
-
* You can optionally enable / disable a plugin from processing events.
|
|
1604
|
-
* Setting enabled to true will not necessarily cause the `isEnabled()` to also return true
|
|
1605
|
-
* as the plugin must also have been successfully initialized and not had it's `teardown` method called
|
|
1606
|
-
* (unless it's also been re-initialized)
|
|
1607
|
-
*/
|
|
1608
|
-
setEnabled: (isEnabled: boolean) => void;
|
|
1609
|
-
remove: (isAsync?: boolean, removeCb?: (removed?: boolean) => void) => void;
|
|
1610
|
-
}
|
|
1611
|
-
|
|
1612
1197
|
/**
|
|
1613
1198
|
* Initialize the queue of plugins
|
|
1614
1199
|
* @param plugins - The array of plugins to initialize and setting of the next plugin
|
|
@@ -1616,7 +1201,7 @@ export declare interface ILoadedPlugin<T extends IPlugin> {
|
|
|
1616
1201
|
* @param core THe current core instance
|
|
1617
1202
|
* @param extensions The extensions
|
|
1618
1203
|
*/
|
|
1619
|
-
export declare function initializePlugins(processContext:
|
|
1204
|
+
export declare function initializePlugins(processContext: ProcessTelemetryContext, extensions: IPlugin[]): void;
|
|
1620
1205
|
|
|
1621
1206
|
/**
|
|
1622
1207
|
* An interface used for the notification listener.
|
|
@@ -1825,7 +1410,7 @@ export declare const _InternalMessageId: {
|
|
|
1825
1410
|
InMemoryStorageBufferFull: number;
|
|
1826
1411
|
};
|
|
1827
1412
|
|
|
1828
|
-
export declare type _InternalMessageId = number |
|
|
1413
|
+
export declare type _InternalMessageId = number | typeof _InternalMessageId;
|
|
1829
1414
|
|
|
1830
1415
|
/**
|
|
1831
1416
|
* This interface identifies the details of an internal performance event - it does not represent an outgoing reported event
|
|
@@ -1946,14 +1531,10 @@ export declare interface IPlugin {
|
|
|
1946
1531
|
*/
|
|
1947
1532
|
isInitialized?: () => boolean;
|
|
1948
1533
|
/**
|
|
1949
|
-
* Tear down the plugin and remove any hooked value, the plugin should
|
|
1950
|
-
* therefore
|
|
1951
|
-
* processTelemetry calls are ignored and it just calls the processNext() with the provided context.
|
|
1952
|
-
* @param unloadCtx - This is the context that should be used during unloading.
|
|
1953
|
-
* @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
|
|
1954
|
-
* @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
|
|
1534
|
+
* Tear down the plugin and remove any hooked value, the plugin should remove that it is no longer initialized and
|
|
1535
|
+
* therefore can be re-initialized after being torn down.
|
|
1955
1536
|
*/
|
|
1956
|
-
teardown?: (
|
|
1537
|
+
teardown?: () => void;
|
|
1957
1538
|
/**
|
|
1958
1539
|
* Extension name
|
|
1959
1540
|
*/
|
|
@@ -1968,73 +1549,61 @@ export declare interface IPlugin {
|
|
|
1968
1549
|
* The current context for the current call to processTelemetry(), used to support sharing the same plugin instance
|
|
1969
1550
|
* between multiple AppInsights instances
|
|
1970
1551
|
*/
|
|
1971
|
-
export declare interface IProcessTelemetryContext
|
|
1552
|
+
export declare interface IProcessTelemetryContext {
|
|
1972
1553
|
/**
|
|
1973
|
-
*
|
|
1974
|
-
* @param env - This is the current event being reported
|
|
1975
|
-
* @returns boolean (true) if there is no more plugins to process otherwise false or undefined (void)
|
|
1554
|
+
* The current core instance for the request
|
|
1976
1555
|
*/
|
|
1977
|
-
|
|
1556
|
+
core: () => IAppInsightsCore;
|
|
1978
1557
|
/**
|
|
1979
|
-
*
|
|
1980
|
-
* @param plugins - The execution order to process the plugins, if null or not supplied
|
|
1981
|
-
* then the current execution order will be copied.
|
|
1982
|
-
* @param startAt - The plugin to start processing from, if missing from the execution
|
|
1983
|
-
* order then the next plugin will be NOT set.
|
|
1558
|
+
* THe current diagnostic logger for the request
|
|
1984
1559
|
*/
|
|
1985
|
-
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
/**
|
|
1989
|
-
* The current context for the current call to teardown() implementations, used to support when plugins are being removed
|
|
1990
|
-
* or the SDK is being unloaded.
|
|
1991
|
-
*/
|
|
1992
|
-
export declare interface IProcessTelemetryUnloadContext extends IBaseProcessingContext {
|
|
1560
|
+
diagLog: () => IDiagnosticLogger;
|
|
1993
1561
|
/**
|
|
1994
|
-
*
|
|
1995
|
-
* @param uploadState - The state of the unload process
|
|
1996
|
-
* @returns boolean (true) if there is no more plugins to process otherwise false or undefined (void)
|
|
1562
|
+
* Gets the current core config instance
|
|
1997
1563
|
*/
|
|
1998
|
-
|
|
1564
|
+
getCfg: () => IConfiguration;
|
|
1999
1565
|
/**
|
|
2000
|
-
*
|
|
2001
|
-
* @param plugins - The execution order to process the plugins, if null or not supplied
|
|
2002
|
-
* then the current execution order will be copied.
|
|
2003
|
-
* @param startAt - The plugin to start processing from, if missing from the execution
|
|
2004
|
-
* order then the next plugin will be NOT set.
|
|
1566
|
+
* Gets the named extension config
|
|
2005
1567
|
*/
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
1568
|
+
getExtCfg: <T>(identifier: string, defaultValue?: T | any) => T;
|
|
1569
|
+
/**
|
|
1570
|
+
* Gets the named config from either the named identifier extension or core config if neither exist then the
|
|
1571
|
+
* default value is returned
|
|
1572
|
+
* @param identifier The named extension identifier
|
|
1573
|
+
* @param field The config field name
|
|
1574
|
+
* @param defaultValue The default value to return if no defined config exists
|
|
1575
|
+
*/
|
|
1576
|
+
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean) => number | string | boolean;
|
|
1577
|
+
/**
|
|
1578
|
+
* Helper to allow plugins to check and possibly shortcut executing code only
|
|
1579
|
+
* required if there is a nextPlugin
|
|
1580
|
+
*/
|
|
1581
|
+
hasNext: () => boolean;
|
|
1582
|
+
/**
|
|
1583
|
+
* Returns the next configured plugin proxy
|
|
1584
|
+
*/
|
|
1585
|
+
getNext: () => ITelemetryPluginChain;
|
|
2014
1586
|
/**
|
|
2015
|
-
*
|
|
2016
|
-
|
|
2017
|
-
|
|
1587
|
+
* Helper to set the next plugin proxy
|
|
1588
|
+
*/
|
|
1589
|
+
setNext: (nextCtx: ITelemetryPluginChain) => void;
|
|
1590
|
+
/**
|
|
1591
|
+
* Call back for telemetry processing before it it is sent
|
|
1592
|
+
* @param env - This is the current event being reported
|
|
2018
1593
|
*/
|
|
2019
|
-
processNext: (
|
|
1594
|
+
processNext: (env: ITelemetryItem) => void;
|
|
2020
1595
|
/**
|
|
2021
|
-
* Create a new context using the core and config from the current instance
|
|
1596
|
+
* Create a new context using the core and config from the current instance
|
|
2022
1597
|
* @param plugins - The execution order to process the plugins, if null or not supplied
|
|
2023
1598
|
* then the current execution order will be copied.
|
|
2024
1599
|
* @param startAt - The plugin to start processing from, if missing from the execution
|
|
2025
1600
|
* order then the next plugin will be NOT set.
|
|
2026
1601
|
*/
|
|
2027
|
-
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) =>
|
|
2028
|
-
}
|
|
2029
|
-
|
|
2030
|
-
export declare interface _IRegisteredEvents {
|
|
2031
|
-
name: string;
|
|
2032
|
-
handler: any;
|
|
1602
|
+
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryContext;
|
|
2033
1603
|
}
|
|
2034
1604
|
|
|
2035
1605
|
/**
|
|
2036
|
-
* Check if an object is of type Array
|
|
2037
|
-
* and exists to help with TypeScript validation only.
|
|
1606
|
+
* Check if an object is of type Array
|
|
2038
1607
|
*/
|
|
2039
1608
|
export declare let isArray: <T = any>(obj: any) => obj is Array<T>;
|
|
2040
1609
|
|
|
@@ -2075,13 +1644,13 @@ export declare function isFunction(value: any): value is Function;
|
|
|
2075
1644
|
*/
|
|
2076
1645
|
export declare function isIE(): boolean;
|
|
2077
1646
|
|
|
2078
|
-
export declare function isNotNullOrUndefined
|
|
1647
|
+
export declare function isNotNullOrUndefined(value: any): boolean;
|
|
2079
1648
|
|
|
2080
1649
|
export declare function isNotTruthy(value: any): boolean;
|
|
2081
1650
|
|
|
2082
|
-
export declare function isNotUndefined
|
|
1651
|
+
export declare function isNotUndefined(value: any): boolean;
|
|
2083
1652
|
|
|
2084
|
-
export declare function isNullOrUndefined(value: any):
|
|
1653
|
+
export declare function isNullOrUndefined(value: any): boolean;
|
|
2085
1654
|
|
|
2086
1655
|
/**
|
|
2087
1656
|
* Checks if the type of value is a number.
|
|
@@ -2090,7 +1659,7 @@ export declare function isNullOrUndefined(value: any): value is null | undefined
|
|
|
2090
1659
|
*/
|
|
2091
1660
|
export declare function isNumber(value: any): value is number;
|
|
2092
1661
|
|
|
2093
|
-
export declare function isObject
|
|
1662
|
+
export declare function isObject(value: any): boolean;
|
|
2094
1663
|
|
|
2095
1664
|
/**
|
|
2096
1665
|
* Returns whether the environment is reporting that we are running in a React Native Environment
|
|
@@ -2118,7 +1687,7 @@ export declare function isTruthy(value: any): boolean;
|
|
|
2118
1687
|
|
|
2119
1688
|
export declare function isTypeof(value: any, theType: string): boolean;
|
|
2120
1689
|
|
|
2121
|
-
export declare function isUndefined(value: any):
|
|
1690
|
+
export declare function isUndefined(value: any): boolean;
|
|
2122
1691
|
|
|
2123
1692
|
/**
|
|
2124
1693
|
* Checks if XMLHttpRequest is supported
|
|
@@ -2126,19 +1695,6 @@ export declare function isUndefined(value: any): value is undefined;
|
|
|
2126
1695
|
*/
|
|
2127
1696
|
export declare function isXhrSupported(): boolean;
|
|
2128
1697
|
|
|
2129
|
-
export declare interface ITelemetryInitializerContainer {
|
|
2130
|
-
/**
|
|
2131
|
-
* Add a telemetry processor to decorate or drop telemetry events.
|
|
2132
|
-
* @param telemetryInitializer - The Telemetry Initializer function
|
|
2133
|
-
* @returns - A ITelemetryInitializerHandler to enable the initializer to be removed
|
|
2134
|
-
*/
|
|
2135
|
-
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
|
|
2136
|
-
}
|
|
2137
|
-
|
|
2138
|
-
export declare interface ITelemetryInitializerHandler {
|
|
2139
|
-
remove(): void;
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
1698
|
/**
|
|
2143
1699
|
* Telemety item supported in Core
|
|
2144
1700
|
*/
|
|
@@ -2188,7 +1744,15 @@ export declare interface ITelemetryItem {
|
|
|
2188
1744
|
/**
|
|
2189
1745
|
* Configuration provided to SDK core
|
|
2190
1746
|
*/
|
|
2191
|
-
export declare interface ITelemetryPlugin extends
|
|
1747
|
+
export declare interface ITelemetryPlugin extends IPlugin {
|
|
1748
|
+
/**
|
|
1749
|
+
* Call back for telemetry processing before it it is sent
|
|
1750
|
+
* @param env - This is the current event being reported
|
|
1751
|
+
* @param itemCtx - This is the context for the current request, ITelemetryPlugin instances
|
|
1752
|
+
* can optionally use this to access the current core instance or define / pass additional information
|
|
1753
|
+
* to later plugins (vs appending items to the telemetry item)
|
|
1754
|
+
*/
|
|
1755
|
+
processTelemetry: (env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => void;
|
|
2192
1756
|
/**
|
|
2193
1757
|
* Set next extension for telemetry processing, this is not optional as plugins should use the
|
|
2194
1758
|
* processNext() function of the passed IProcessTelemetryContext instead. It is being kept for
|
|
@@ -2204,7 +1768,7 @@ export declare interface ITelemetryPlugin extends ITelemetryProcessor, IPlugin {
|
|
|
2204
1768
|
/**
|
|
2205
1769
|
* Configuration provided to SDK core
|
|
2206
1770
|
*/
|
|
2207
|
-
export declare interface ITelemetryPluginChain
|
|
1771
|
+
export declare interface ITelemetryPluginChain {
|
|
2208
1772
|
/**
|
|
2209
1773
|
* Returns the underlying plugin that is being proxied for the processTelemetry call
|
|
2210
1774
|
*/
|
|
@@ -2213,16 +1777,6 @@ export declare interface ITelemetryPluginChain extends ITelemetryProcessor {
|
|
|
2213
1777
|
* Returns the next plugin
|
|
2214
1778
|
*/
|
|
2215
1779
|
getNext: () => ITelemetryPluginChain;
|
|
2216
|
-
/**
|
|
2217
|
-
* This plugin is being unloaded and should remove any hooked events and cleanup any global/scoped values, after this
|
|
2218
|
-
* call the plugin will be removed from the telemetry processing chain and will no longer receive any events..
|
|
2219
|
-
* @param unloadCtx - The unload context to use for this call.
|
|
2220
|
-
* @param unloadState - The details of the unload operation
|
|
2221
|
-
*/
|
|
2222
|
-
unload?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
declare interface ITelemetryProcessor {
|
|
2226
1780
|
/**
|
|
2227
1781
|
* Call back for telemetry processing before it it is sent
|
|
2228
1782
|
* @param env - This is the current event being reported
|
|
@@ -2230,60 +1784,7 @@ declare interface ITelemetryProcessor {
|
|
|
2230
1784
|
* can optionally use this to access the current core instance or define / pass additional information
|
|
2231
1785
|
* to later plugins (vs appending items to the telemetry item)
|
|
2232
1786
|
*/
|
|
2233
|
-
processTelemetry: (env: ITelemetryItem, itemCtx
|
|
2234
|
-
/**
|
|
2235
|
-
* The the plugin should re-evaluate configuration and update any cached configuration settings or
|
|
2236
|
-
* plugins. If implemented this method will be called whenever a plugin is added or removed and if
|
|
2237
|
-
* the configuration has bee updated.
|
|
2238
|
-
* @param updateCtx - This is the context that should be used during updating.
|
|
2239
|
-
* @param updateState - The details / state of the update process, it holds details like the current and previous configuration.
|
|
2240
|
-
* @returns boolean - true if the plugin has or will call updateCtx.processNext(), this allows the plugin to perform any asynchronous operations.
|
|
2241
|
-
*/
|
|
2242
|
-
update?: (updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState) => void | boolean;
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2245
|
-
export declare interface ITelemetryUnloadState {
|
|
2246
|
-
reason: TelemetryUnloadReason;
|
|
2247
|
-
isAsync: boolean;
|
|
2248
|
-
flushComplete?: boolean;
|
|
2249
|
-
}
|
|
2250
|
-
|
|
2251
|
-
export declare interface ITelemetryUpdateState {
|
|
2252
|
-
/**
|
|
2253
|
-
* Identifies the reason for the update notification, this is a bitwise numeric value
|
|
2254
|
-
*/
|
|
2255
|
-
reason: TelemetryUpdateReason;
|
|
2256
|
-
/**
|
|
2257
|
-
* If this is a configuration update this was the previous configuration that was used
|
|
2258
|
-
*/
|
|
2259
|
-
/**
|
|
2260
|
-
* If this is a configuration update is the new configuration that is being used
|
|
2261
|
-
*/
|
|
2262
|
-
/**
|
|
2263
|
-
* This holds a collection of plugins that have been added (if the reason identifies that one or more plugins have been added)
|
|
2264
|
-
*/
|
|
2265
|
-
added?: IPlugin[];
|
|
2266
|
-
/**
|
|
2267
|
-
* This holds a collection of plugins that have been removed (if the reason identifies that one or more plugins have been removed)
|
|
2268
|
-
*/
|
|
2269
|
-
removed?: IPlugin[];
|
|
2270
|
-
}
|
|
2271
|
-
|
|
2272
|
-
export declare interface IUnloadableComponent {
|
|
2273
|
-
/**
|
|
2274
|
-
* Teardown / Unload hook to allow implementations to perform some additional unload operations before the BaseTelemetryPlugin
|
|
2275
|
-
* finishes it's removal.
|
|
2276
|
-
* @param unloadCtx - This is the context that should be used during unloading.
|
|
2277
|
-
* @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
|
|
2278
|
-
* @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.
|
|
2279
|
-
* @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
|
|
2280
|
-
*/
|
|
2281
|
-
_doUnload?: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void) => void | boolean;
|
|
2282
|
-
}
|
|
2283
|
-
|
|
2284
|
-
export declare interface IUnloadHandlerContainer {
|
|
2285
|
-
add: (handler: UnloadHandler) => void;
|
|
2286
|
-
run: (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
1787
|
+
processTelemetry: (env: ITelemetryItem, itemCtx: IProcessTelemetryContext) => void;
|
|
2287
1788
|
}
|
|
2288
1789
|
|
|
2289
1790
|
/**
|
|
@@ -2298,14 +1799,16 @@ export declare interface IUnloadHandlerContainer {
|
|
|
2298
1799
|
*/
|
|
2299
1800
|
export declare function _legacyCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
2300
1801
|
|
|
2301
|
-
export declare
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
1802
|
+
export declare enum LoggingSeverity {
|
|
1803
|
+
/**
|
|
1804
|
+
* Error will be sent as internal telemetry
|
|
1805
|
+
*/
|
|
1806
|
+
CRITICAL = 1,
|
|
1807
|
+
/**
|
|
1808
|
+
* Error will NOT be sent as internal telemetry, and will only be shown in browser console
|
|
1809
|
+
*/
|
|
1810
|
+
WARNING = 2
|
|
1811
|
+
}
|
|
2309
1812
|
|
|
2310
1813
|
export declare const MinChannelPriorty: number;
|
|
2311
1814
|
|
|
@@ -2397,27 +1900,13 @@ export { objCreate }
|
|
|
2397
1900
|
*/
|
|
2398
1901
|
export declare function objDefineAccessors<T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void): boolean;
|
|
2399
1902
|
|
|
2400
|
-
/**
|
|
2401
|
-
* Pass in the objects to merge as arguments, this will only "merge" (extend) properties that are owned by the object.
|
|
2402
|
-
* It will NOT merge inherited or non-enumerable properties.
|
|
2403
|
-
* @param obj1 - object to merge. Set this argument to 'true' for a deep extend.
|
|
2404
|
-
* @param obj2 - object to merge.
|
|
2405
|
-
* @param obj3 - object to merge.
|
|
2406
|
-
* @param obj4 - object to merge.
|
|
2407
|
-
* @param obj5 - object to merge.
|
|
2408
|
-
* @returns The extended first object.
|
|
2409
|
-
*/
|
|
2410
|
-
export declare function objExtend<T2, T3, T4, T5, T6>(deepExtend?: boolean, obj2?: T2, obj3?: T3, obj4?: T4, obj5?: T5, obj6?: T6): T2 & T3 & T4 & T5 & T6;
|
|
2411
|
-
|
|
2412
|
-
export declare 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;
|
|
2413
|
-
|
|
2414
1903
|
/**
|
|
2415
1904
|
* This is a helper function for the equivalent of arForEach(objKeys(target), callbackFn), this is a
|
|
2416
1905
|
* performance optimization to avoid the creation of a new array for large objects
|
|
2417
1906
|
* @param target The target object to find and process the keys
|
|
2418
1907
|
* @param callbackfn The function to call with the details
|
|
2419
1908
|
*/
|
|
2420
|
-
export declare function objForEachKey
|
|
1909
|
+
export declare function objForEachKey(target: any, callbackfn: (name: string, value: any) => void): void;
|
|
2421
1910
|
|
|
2422
1911
|
export declare const objFreeze: <T>(value: T) => T;
|
|
2423
1912
|
|
|
@@ -2431,8 +1920,6 @@ export declare function objKeys(obj: {}): string[];
|
|
|
2431
1920
|
|
|
2432
1921
|
export declare const objSeal: <T>(value: T) => T;
|
|
2433
1922
|
|
|
2434
|
-
export declare function objToString(obj: any): any;
|
|
2435
|
-
|
|
2436
1923
|
/**
|
|
2437
1924
|
* A helper function to assist with JIT performance for objects that have properties added / removed dynamically
|
|
2438
1925
|
* this is primarily for chromium based browsers and has limited effects on Firefox and none of IE. Only call this
|
|
@@ -2488,7 +1975,7 @@ export declare class PerfManager implements IPerfManager {
|
|
|
2488
1975
|
* Defined as private so it can be visualized via the DebugPlugin
|
|
2489
1976
|
*/
|
|
2490
1977
|
private ctx;
|
|
2491
|
-
constructor(manager
|
|
1978
|
+
constructor(manager: INotificationManager);
|
|
2492
1979
|
/**
|
|
2493
1980
|
* Create a new event and start timing, the manager may return null/undefined to indicate that it does not
|
|
2494
1981
|
* want to monitor this source event.
|
|
@@ -2521,17 +2008,13 @@ export declare class PerfManager implements IPerfManager {
|
|
|
2521
2008
|
*/
|
|
2522
2009
|
export declare function perfNow(): number;
|
|
2523
2010
|
|
|
2524
|
-
/**
|
|
2525
|
-
* This class will be removed!
|
|
2526
|
-
* @deprecated use createProcessTelemetryContext() instead
|
|
2527
|
-
*/
|
|
2528
2011
|
export declare class ProcessTelemetryContext implements IProcessTelemetryContext {
|
|
2529
2012
|
/**
|
|
2530
2013
|
* Gets the current core config instance
|
|
2531
2014
|
*/
|
|
2532
2015
|
getCfg: () => IConfiguration;
|
|
2533
2016
|
getExtCfg: <T>(identifier: string, defaultValue?: T | any) => T;
|
|
2534
|
-
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean
|
|
2017
|
+
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean) => number | string | boolean;
|
|
2535
2018
|
/**
|
|
2536
2019
|
* Returns the IAppInsightsCore instance for the current request
|
|
2537
2020
|
*/
|
|
@@ -2559,34 +2042,19 @@ export declare class ProcessTelemetryContext implements IProcessTelemetryContext
|
|
|
2559
2042
|
* @param itemCtx - This is the context for the current request, ITelemetryPlugin instances
|
|
2560
2043
|
* can optionally use this to access the current core instance or define / pass additional information
|
|
2561
2044
|
* to later plugins (vs appending items to the telemetry item)
|
|
2562
|
-
* @returns boolean (true) if there is no more plugins to process otherwise false or undefined (void)
|
|
2563
|
-
*/
|
|
2564
|
-
processNext: (env: ITelemetryItem) => boolean | void;
|
|
2565
|
-
/**
|
|
2566
|
-
* Synchronously iterate over the context chain running the callback for each plugin, once
|
|
2567
|
-
* every plugin has been executed via the callback, any associated onComplete will be called.
|
|
2568
|
-
* @param callback - The function call for each plugin in the context chain
|
|
2569
2045
|
*/
|
|
2570
|
-
|
|
2046
|
+
processNext: (env: ITelemetryItem) => void;
|
|
2571
2047
|
/**
|
|
2572
2048
|
* Create a new context using the core and config from the current instance
|
|
2573
|
-
* @param plugins - The execution order to process the plugins, if null or not supplied
|
|
2574
|
-
* then the current execution order will be copied.
|
|
2575
|
-
* @param startAt - The plugin to start processing from, if missing from the execution
|
|
2576
|
-
* order then the next plugin will be NOT set.
|
|
2577
2049
|
*/
|
|
2578
2050
|
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryContext;
|
|
2579
|
-
/**
|
|
2580
|
-
* Set the function to call when the current chain has executed all processNext or unloadNext items.
|
|
2581
|
-
*/
|
|
2582
|
-
onComplete: (onComplete: () => void) => void;
|
|
2583
2051
|
/**
|
|
2584
2052
|
* Creates a new Telemetry Item context with the current config, core and plugin execution chain
|
|
2585
2053
|
* @param plugins - The plugin instances that will be executed
|
|
2586
2054
|
* @param config - The current config
|
|
2587
2055
|
* @param core - The current core instance
|
|
2588
2056
|
*/
|
|
2589
|
-
constructor(
|
|
2057
|
+
constructor(plugins: IPlugin[] | ITelemetryPluginChain, config: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin);
|
|
2590
2058
|
}
|
|
2591
2059
|
|
|
2592
2060
|
/**
|
|
@@ -2603,19 +2071,9 @@ export declare class ProcessTelemetryContext implements IProcessTelemetryContext
|
|
|
2603
2071
|
* @param target - The target object to be assigned with the source properties and functions
|
|
2604
2072
|
* @param source - The source object which will be assigned / called by setting / calling the targets proxies
|
|
2605
2073
|
* @param chkSet - An optional callback to determine whether a specific property/function should be proxied
|
|
2074
|
+
* @memberof Initialization
|
|
2606
2075
|
*/
|
|
2607
|
-
export declare function proxyAssign
|
|
2608
|
-
|
|
2609
|
-
export declare function proxyFunctionAs<T, S>(target: T, name: string, source: S | (() => S), theFunc: (keyof S), overwriteTarget?: boolean): void;
|
|
2610
|
-
|
|
2611
|
-
/**
|
|
2612
|
-
* Creates proxy functions on the target which internally will call the source version with all arguments passed to the target method.
|
|
2613
|
-
*
|
|
2614
|
-
* @param target - The target object to be assigned with the source properties and functions
|
|
2615
|
-
* @param source - The source object which will be assigned / called by setting / calling the targets proxies
|
|
2616
|
-
* @param functionsToProxy - An array of function names that will be proxied on the target
|
|
2617
|
-
*/
|
|
2618
|
-
export declare function proxyFunctions<T, S>(target: T, source: S | (() => S), functionsToProxy: (keyof S)[], overwriteTarget?: boolean): T;
|
|
2076
|
+
export declare function proxyAssign(target: any, source: any, chkSet?: (name: string, isFunc?: boolean, source?: any, target?: any) => boolean): any;
|
|
2619
2077
|
|
|
2620
2078
|
/**
|
|
2621
2079
|
* generate a random 32-bit number (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), defaults un-unsigned.
|
|
@@ -2630,52 +2088,6 @@ export declare function random32(signed?: boolean): number;
|
|
|
2630
2088
|
*/
|
|
2631
2089
|
export declare function randomValue(maxValue: number): number;
|
|
2632
2090
|
|
|
2633
|
-
/**
|
|
2634
|
-
* Trys to remove event handler(s) for the specified event/namespace to the window, body and document
|
|
2635
|
-
* @param eventName {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
2636
|
-
* such as "click", "click.mynamespace" or ".mynamespace"
|
|
2637
|
-
* @param callback {any} - - The callback function that needs to be removed from the given event, when using a
|
|
2638
|
-
* namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers
|
|
2639
|
-
* otherwise this will only remove events with this specific handler.
|
|
2640
|
-
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
2641
|
-
*/
|
|
2642
|
-
export declare function removeEventHandler(eventName: string, callback: any, evtNamespace?: string | string[] | null): void;
|
|
2643
|
-
|
|
2644
|
-
/**
|
|
2645
|
-
* Remove the listener from the array of events
|
|
2646
|
-
* @param events An string array of event names to bind the listener to
|
|
2647
|
-
* @param listener The event callback to call when the event is triggered
|
|
2648
|
-
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
2649
|
-
*/
|
|
2650
|
-
export declare function removeEventListeners(events: string[], listener: any, evtNamespace?: string | string[]): void;
|
|
2651
|
-
|
|
2652
|
-
/**
|
|
2653
|
-
* Removes the pageHide event listeners added by addPageHideEventListener, because the 'visibilitychange' uses
|
|
2654
|
-
* an internal proxy to detect the visibility state you SHOULD use a unique namespace when calling addPageHideEventListener
|
|
2655
|
-
* as the remove ignores the listener argument for the 'visibilitychange' event.
|
|
2656
|
-
* @param listener - The specific listener to remove for the 'pageshow' event only (ignored for 'visibilitychange')
|
|
2657
|
-
* @param evtNamespace - The unique namespace used when calling addPageShowEventListener
|
|
2658
|
-
*/
|
|
2659
|
-
export declare function removePageHideEventListener(listener: any, evtNamespace?: string | string[] | null): void;
|
|
2660
|
-
|
|
2661
|
-
/**
|
|
2662
|
-
* Removes the pageShow event listeners added by addPageShowEventListener, because the 'visibilitychange' uses
|
|
2663
|
-
* an internal proxy to detect the visibility state you SHOULD use a unique namespace when calling addPageShowEventListener
|
|
2664
|
-
* as the remove ignores the listener argument for the 'visibilitychange' event.
|
|
2665
|
-
* @param listener - The specific listener to remove for the 'pageshow' event only (ignored for 'visibilitychange')
|
|
2666
|
-
* @param evtNamespace - The unique namespace used when calling addPageShowEventListener
|
|
2667
|
-
*/
|
|
2668
|
-
export declare function removePageShowEventListener(listener: any, evtNamespace?: string | string[] | null): void;
|
|
2669
|
-
|
|
2670
|
-
/**
|
|
2671
|
-
* Remove any matching 'beforeunload', 'unload' and 'pagehide' events that may have been added via addEventListener,
|
|
2672
|
-
* addEventListeners, addPageUnloadEventListener or addPageHideEventListener.
|
|
2673
|
-
* @param listener - The specific event callback to to be removed
|
|
2674
|
-
* @param evtNamespace - [Optional] Namespace(s) uniquely identified and removed based on this namespace.
|
|
2675
|
-
* @returns true - when at least one of the events was registered otherwise false
|
|
2676
|
-
*/
|
|
2677
|
-
export declare function removePageUnloadEventListener(listener: any, evtNamespace?: string | string[]): void;
|
|
2678
|
-
|
|
2679
2091
|
/**
|
|
2680
2092
|
* Helper to return the ICookieMgr from the core (if not null/undefined) or a default implementation
|
|
2681
2093
|
* associated with the configuration or a legacy default.
|
|
@@ -2719,10 +2131,6 @@ export declare const enum SendRequestReason {
|
|
|
2719
2131
|
* The event(s) being sent as a retry
|
|
2720
2132
|
*/
|
|
2721
2133
|
Retry = 5,
|
|
2722
|
-
/**
|
|
2723
|
-
* The SDK is unloading
|
|
2724
|
-
*/
|
|
2725
|
-
SdkUnload = 6,
|
|
2726
2134
|
/**
|
|
2727
2135
|
* Maximum batch size would be exceeded
|
|
2728
2136
|
*/
|
|
@@ -2761,9 +2169,9 @@ export declare function setGblPerfMgr(perfManager: IPerfManager): void;
|
|
|
2761
2169
|
* @param srcChk - [Optional] Callback to check to original value that if supplied will be called if the new value should be set (if allowed)
|
|
2762
2170
|
* @returns The existing or new value, depending what was set
|
|
2763
2171
|
*/
|
|
2764
|
-
export declare function setValue<T, K extends keyof T>(target: T, field: K, value: T[K], valChk?: (
|
|
2172
|
+
export declare 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];
|
|
2765
2173
|
|
|
2766
|
-
export declare function sortPlugins
|
|
2174
|
+
export declare function sortPlugins(plugins: IPlugin[]): IPlugin[];
|
|
2767
2175
|
|
|
2768
2176
|
/**
|
|
2769
2177
|
* A simple wrapper (for minification support) to check if the value contains the search string.
|
|
@@ -2809,64 +2217,8 @@ export declare interface Tags {
|
|
|
2809
2217
|
[key: string]: any;
|
|
2810
2218
|
}
|
|
2811
2219
|
|
|
2812
|
-
export declare type TelemetryInitializerFunction = <T extends ITelemetryItem>(item: T) => boolean | void;
|
|
2813
|
-
|
|
2814
|
-
/**
|
|
2815
|
-
* The TelemetryUnloadReason enumeration contains the possible reasons for why a plugin is being unloaded / torndown().
|
|
2816
|
-
*/
|
|
2817
|
-
export declare const enum TelemetryUnloadReason {
|
|
2818
|
-
/**
|
|
2819
|
-
* Teardown has been called without any context.
|
|
2820
|
-
*/
|
|
2821
|
-
ManualTeardown = 0,
|
|
2822
|
-
/**
|
|
2823
|
-
* Just this plugin is being removed
|
|
2824
|
-
*/
|
|
2825
|
-
PluginUnload = 1,
|
|
2826
|
-
/**
|
|
2827
|
-
* This instance of the plugin is being removed and replaced
|
|
2828
|
-
*/
|
|
2829
|
-
PluginReplace = 2,
|
|
2830
|
-
/**
|
|
2831
|
-
* The entire SDK is being unloaded
|
|
2832
|
-
*/
|
|
2833
|
-
SdkUnload = 50
|
|
2834
|
-
}
|
|
2835
|
-
|
|
2836
|
-
/**
|
|
2837
|
-
* The TelemetryUpdateReason enumeration contains a set of bit-wise values that specify the reason for update request.
|
|
2838
|
-
*/
|
|
2839
|
-
export declare const enum TelemetryUpdateReason {
|
|
2840
|
-
/**
|
|
2841
|
-
* Unknown.
|
|
2842
|
-
*/
|
|
2843
|
-
Unknown = 0,
|
|
2844
|
-
/**
|
|
2845
|
-
* The configuration has ben updated or changed
|
|
2846
|
-
*/
|
|
2847
|
-
/**
|
|
2848
|
-
* One or more plugins have been added
|
|
2849
|
-
*/
|
|
2850
|
-
PluginAdded = 16,
|
|
2851
|
-
/**
|
|
2852
|
-
* One or more plugins have been removed
|
|
2853
|
-
*/
|
|
2854
|
-
PluginRemoved = 32
|
|
2855
|
-
}
|
|
2856
|
-
|
|
2857
2220
|
export declare function throwError(message: string): never;
|
|
2858
2221
|
|
|
2859
|
-
/**
|
|
2860
|
-
* This is a helper method which will call throwInternal on the passed logger, will throw exceptions in
|
|
2861
|
-
* debug mode or attempt to log the error as a console warning. This helper is provided mostly to better
|
|
2862
|
-
* support minification as logger.throwInternal() will not compress the publish "throwInternal" used throughout
|
|
2863
|
-
* the code.
|
|
2864
|
-
* @param logger - The Diagnostic Logger instance to use.
|
|
2865
|
-
* @param severity {LoggingSeverity} - The severity of the log message
|
|
2866
|
-
* @param message {_InternalLogMessage} - The log message.
|
|
2867
|
-
*/
|
|
2868
|
-
export declare function _throwInternal(logger: IDiagnosticLogger, severity: LoggingSeverity, msgId: _InternalMessageId, msg: string, properties?: Object, isUserAct?: boolean): void;
|
|
2869
|
-
|
|
2870
2222
|
/**
|
|
2871
2223
|
* Convert a date to I.S.O. format in IE8
|
|
2872
2224
|
*/
|
|
@@ -2876,19 +2228,6 @@ export declare function uaDisallowsSameSiteNone(userAgent: string): boolean;
|
|
|
2876
2228
|
|
|
2877
2229
|
export declare const Undefined = "undefined";
|
|
2878
2230
|
|
|
2879
|
-
/**
|
|
2880
|
-
* Teardown / Unload helper to perform teardown/unloading operations for the provided components synchronously or asynchronously, this will call any
|
|
2881
|
-
* _doTeardown() or _doUnload() functions on the provided components to allow them to finish removal.
|
|
2882
|
-
* @param components - The components you want to unload
|
|
2883
|
-
* @param unloadCtx - This is the context that should be used during unloading.
|
|
2884
|
-
* @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
|
|
2885
|
-
* @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.
|
|
2886
|
-
* @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
|
|
2887
|
-
*/
|
|
2888
|
-
export declare function unloadComponents(components: any | IUnloadableComponent[], unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void): void | boolean;
|
|
2889
|
-
|
|
2890
|
-
export declare type UnloadHandler = (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
2891
|
-
|
|
2892
2231
|
export declare function useXDomainRequest(): boolean | undefined;
|
|
2893
2232
|
|
|
2894
2233
|
export { }
|