@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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
import { getCrypto, getMsCrypto, isIE } from "./EnvUtils";
|
|
4
4
|
import { dateNow } from "./HelperFuncs";
|
|
5
|
+
import { strEmpty } from "./InternalConstants";
|
|
5
6
|
|
|
6
7
|
const UInt32Mask = 0x100000000;
|
|
7
8
|
const MaxUInt32 = 0xffffffff;
|
|
@@ -52,12 +53,14 @@ export function randomValue(maxValue: number) {
|
|
|
52
53
|
* @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)
|
|
53
54
|
*/
|
|
54
55
|
export function random32(signed?: boolean) {
|
|
55
|
-
let value;
|
|
56
|
+
let value = 0;
|
|
56
57
|
let c = getCrypto() || getMsCrypto();
|
|
57
58
|
if (c && c.getRandomValues) {
|
|
58
59
|
// Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)
|
|
59
60
|
value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
|
|
60
|
-
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (value === 0 && isIE()) {
|
|
61
64
|
// For IE 6, 7, 8 (especially on XP) Math.random is not very random
|
|
62
65
|
if (!_mwcSeeded) {
|
|
63
66
|
// Set the seed for the Mwc algorithm
|
|
@@ -67,7 +70,9 @@ export function random32(signed?: boolean) {
|
|
|
67
70
|
// Don't use Math.random for IE
|
|
68
71
|
// Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)
|
|
69
72
|
value = mwcRandom32() & MaxUInt32;
|
|
70
|
-
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (value === 0) {
|
|
71
76
|
// Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)
|
|
72
77
|
value = Math.floor((UInt32Mask * Math.random()) | 0);
|
|
73
78
|
}
|
|
@@ -112,3 +117,30 @@ export function mwcRandom32(signed?: boolean) {
|
|
|
112
117
|
return value;
|
|
113
118
|
}
|
|
114
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Generate random base64 id string.
|
|
122
|
+
* The default length is 22 which is 132-bits so almost the same as a GUID but as base64 (the previous default was 5)
|
|
123
|
+
* @param maxLength - Optional value to specify the length of the id to be generated, defaults to 22
|
|
124
|
+
*/
|
|
125
|
+
export function newId(maxLength = 22): string {
|
|
126
|
+
const base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
127
|
+
|
|
128
|
+
// Start with an initial random number, consuming the value in reverse byte order
|
|
129
|
+
let number = random32() >>> 0; // Make sure it's a +ve number
|
|
130
|
+
let chars = 0;
|
|
131
|
+
let result = strEmpty;
|
|
132
|
+
while (result.length < maxLength) {
|
|
133
|
+
chars ++;
|
|
134
|
+
result += base64chars.charAt(number & 0x3F);
|
|
135
|
+
number >>>= 6; // Zero fill with right shift
|
|
136
|
+
if (chars === 5) {
|
|
137
|
+
// 5 base64 characters === 30 bits so we don't have enough bits for another base64 char
|
|
138
|
+
// So add on another 30 bits and make sure it's +ve
|
|
139
|
+
number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
|
|
140
|
+
chars = 0; // We need to reset the number every 5 chars (30 bits)
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return result;
|
|
145
|
+
}
|
|
146
|
+
|
|
@@ -3,16 +3,28 @@
|
|
|
3
3
|
"use strict";
|
|
4
4
|
|
|
5
5
|
import { IPlugin, ITelemetryPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
6
|
-
import {
|
|
7
|
-
import { _InternalMessageId } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
8
|
-
import { ProcessTelemetryContext } from "./ProcessTelemetryContext";
|
|
6
|
+
import { IProcessTelemetryContext, IProcessTelemetryUnloadContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
9
7
|
import { ITelemetryPluginChain } from "../JavaScriptSDK.Interfaces/ITelemetryPluginChain";
|
|
10
8
|
import { arrForEach, isFunction } from "./HelperFuncs";
|
|
9
|
+
import { strCore, strDoTeardown, strIsInitialized, strPriority, strProcessTelemetry, strSetNextPlugin, strTeardown } from "./InternalConstants";
|
|
10
|
+
import { createElmNodeData } from "./DataCacheHelper";
|
|
11
|
+
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
12
|
+
import { IUnloadableComponent } from "../JavaScriptSDK.Interfaces/IUnloadableComponent";
|
|
13
|
+
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
const strDoUnload = "_doUnload";
|
|
16
|
+
export interface IPluginState {
|
|
17
|
+
core?: IAppInsightsCore;
|
|
18
|
+
isInitialized?: boolean;
|
|
19
|
+
tearDown?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const pluginStateData = createElmNodeData("plugin");
|
|
24
|
+
|
|
25
|
+
export function _getPluginState(plugin: IPlugin): IPluginState {
|
|
26
|
+
return pluginStateData.get<IPluginState>(plugin, "state", {}, true)
|
|
27
|
+
}
|
|
16
28
|
|
|
17
29
|
/**
|
|
18
30
|
* Initialize the queue of plugins
|
|
@@ -21,23 +33,32 @@ let isInitialized = "isInitialized";
|
|
|
21
33
|
* @param core THe current core instance
|
|
22
34
|
* @param extensions The extensions
|
|
23
35
|
*/
|
|
24
|
-
export function initializePlugins(processContext:
|
|
36
|
+
export function initializePlugins(processContext: IProcessTelemetryContext, extensions: IPlugin[]) {
|
|
25
37
|
|
|
26
38
|
// Set the next plugin and identified the uninitialized plugins
|
|
27
|
-
let initPlugins:ITelemetryPlugin[] = [];
|
|
28
|
-
let lastPlugin:ITelemetryPlugin = null;
|
|
29
|
-
let proxy:ITelemetryPluginChain = processContext.getNext();
|
|
39
|
+
let initPlugins: ITelemetryPlugin[] = [];
|
|
40
|
+
let lastPlugin: ITelemetryPlugin = null;
|
|
41
|
+
let proxy: ITelemetryPluginChain = processContext.getNext();
|
|
42
|
+
let pluginState: IPluginState;
|
|
30
43
|
while (proxy) {
|
|
31
44
|
let thePlugin = proxy.getPlugin();
|
|
32
45
|
if (thePlugin) {
|
|
33
46
|
if (lastPlugin &&
|
|
34
|
-
isFunction(lastPlugin[
|
|
35
|
-
isFunction(thePlugin[
|
|
47
|
+
isFunction(lastPlugin[strSetNextPlugin]) &&
|
|
48
|
+
isFunction(thePlugin[strProcessTelemetry])) {
|
|
36
49
|
// Set this plugin as the next for the previous one
|
|
37
|
-
lastPlugin[
|
|
50
|
+
lastPlugin[strSetNextPlugin](thePlugin);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
let isInitialized = false;
|
|
54
|
+
if (isFunction(thePlugin[strIsInitialized])) {
|
|
55
|
+
isInitialized = thePlugin[strIsInitialized]();
|
|
56
|
+
} else {
|
|
57
|
+
pluginState = _getPluginState(thePlugin);
|
|
58
|
+
isInitialized = pluginState[strIsInitialized];
|
|
38
59
|
}
|
|
39
60
|
|
|
40
|
-
if (!
|
|
61
|
+
if (!isInitialized) {
|
|
41
62
|
initPlugins.push(thePlugin);
|
|
42
63
|
}
|
|
43
64
|
|
|
@@ -46,23 +67,35 @@ export function initializePlugins(processContext:ProcessTelemetryContext, extens
|
|
|
46
67
|
}
|
|
47
68
|
}
|
|
48
69
|
|
|
49
|
-
// Now
|
|
70
|
+
// Now initialize the plugins
|
|
50
71
|
arrForEach(initPlugins, thePlugin => {
|
|
72
|
+
let core = processContext.core();
|
|
73
|
+
|
|
51
74
|
thePlugin.initialize(
|
|
52
75
|
processContext.getCfg(),
|
|
53
|
-
|
|
76
|
+
core,
|
|
54
77
|
extensions,
|
|
55
78
|
processContext.getNext());
|
|
79
|
+
|
|
80
|
+
pluginState = _getPluginState(thePlugin);
|
|
81
|
+
|
|
82
|
+
// Only add the core to the state if the plugin didn't set it (doesn't extent from BaseTelemetryPlugin)
|
|
83
|
+
if (!thePlugin[strCore] && !pluginState[strCore]) {
|
|
84
|
+
pluginState[strCore] = core;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
pluginState[strIsInitialized] = true;
|
|
88
|
+
delete pluginState[strTeardown];
|
|
56
89
|
});
|
|
57
90
|
}
|
|
58
91
|
|
|
59
|
-
export function sortPlugins(plugins:
|
|
92
|
+
export function sortPlugins<T = IPlugin>(plugins:T[]) {
|
|
60
93
|
// Sort by priority
|
|
61
94
|
return plugins.sort((extA, extB) => {
|
|
62
95
|
let result = 0;
|
|
63
|
-
let bHasProcess = isFunction(extB[
|
|
64
|
-
if (isFunction(extA[
|
|
65
|
-
result = bHasProcess ? extA[
|
|
96
|
+
let bHasProcess = isFunction(extB[strProcessTelemetry]);
|
|
97
|
+
if (isFunction(extA[strProcessTelemetry])) {
|
|
98
|
+
result = bHasProcess ? extA[strPriority] - extB[strPriority] : 1;
|
|
66
99
|
} else if (bHasProcess) {
|
|
67
100
|
result = -1;
|
|
68
101
|
}
|
|
@@ -70,4 +103,33 @@ export function sortPlugins(plugins:IPlugin[]) {
|
|
|
70
103
|
return result;
|
|
71
104
|
});
|
|
72
105
|
// sort complete
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Teardown / Unload helper to perform teardown/unloading operations for the provided components synchronously or asynchronously, this will call any
|
|
110
|
+
* _doTeardown() or _doUnload() functions on the provided components to allow them to finish removal.
|
|
111
|
+
* @param components - The components you want to unload
|
|
112
|
+
* @param unloadCtx - This is the context that should be used during unloading.
|
|
113
|
+
* @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.
|
|
114
|
+
* @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.
|
|
115
|
+
* @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
|
|
116
|
+
*/
|
|
117
|
+
export function unloadComponents(components: any | IUnloadableComponent[], unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void): void | boolean {
|
|
118
|
+
let idx = 0;
|
|
119
|
+
|
|
120
|
+
function _doUnload(): void | boolean {
|
|
121
|
+
while (idx < components.length) {
|
|
122
|
+
let component = components[idx++];
|
|
123
|
+
if (component) {
|
|
124
|
+
let func = component[strDoUnload] || component[strDoTeardown];
|
|
125
|
+
if (isFunction(func)) {
|
|
126
|
+
if (func.call(component, unloadCtx, unloadState, _doUnload) === true) {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return _doUnload();
|
|
73
135
|
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// // Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// // Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
5
|
+
import { eLoggingSeverity, _eInternalMessageId } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
6
|
+
import { IProcessTelemetryContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
7
|
+
import { ITelemetryInitializerContainer, ITelemetryInitializerHandler, TelemetryInitializerFunction } from "../JavaScriptSDK.Interfaces/ITelemetryInitializers";
|
|
8
|
+
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
9
|
+
import { BaseTelemetryPlugin } from "./BaseTelemetryPlugin";
|
|
10
|
+
import { _throwInternal } from "./DiagnosticLogger";
|
|
11
|
+
import { dumpObj } from "./EnvUtils";
|
|
12
|
+
import { arrForEach, getExceptionName } from "./HelperFuncs";
|
|
13
|
+
import { strDoTeardown } from "./InternalConstants";
|
|
14
|
+
|
|
15
|
+
interface _IInternalTelemetryInitializerHandler {
|
|
16
|
+
id: number;
|
|
17
|
+
fn: TelemetryInitializerFunction;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class TelemetryInitializerPlugin extends BaseTelemetryPlugin implements ITelemetryInitializerContainer {
|
|
21
|
+
|
|
22
|
+
public identifier: string = "TelemetryInitializerPlugin";
|
|
23
|
+
priority: number = 199;
|
|
24
|
+
|
|
25
|
+
constructor() {
|
|
26
|
+
super();
|
|
27
|
+
|
|
28
|
+
// NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()
|
|
29
|
+
let _id: number;
|
|
30
|
+
let _initializers: _IInternalTelemetryInitializerHandler[];
|
|
31
|
+
|
|
32
|
+
_initDefaults();
|
|
33
|
+
|
|
34
|
+
dynamicProto(TelemetryInitializerPlugin, this, (_self, _base) => {
|
|
35
|
+
|
|
36
|
+
_self.addTelemetryInitializer = (telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler => {
|
|
37
|
+
let theInitializer = {
|
|
38
|
+
id: _id++,
|
|
39
|
+
fn: telemetryInitializer
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
_initializers.push(theInitializer);
|
|
43
|
+
|
|
44
|
+
let handler: ITelemetryInitializerHandler = {
|
|
45
|
+
remove: () => {
|
|
46
|
+
arrForEach(_initializers, (initializer, idx) => {
|
|
47
|
+
if (initializer.id === theInitializer.id) {
|
|
48
|
+
_initializers.splice(idx, 1);
|
|
49
|
+
return -1;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return handler;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
_self.processTelemetry = (item: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void => {
|
|
59
|
+
var doNotSendItem = false;
|
|
60
|
+
var telemetryInitializersCount = _initializers.length;
|
|
61
|
+
for (var i = 0; i < telemetryInitializersCount; ++i) {
|
|
62
|
+
var telemetryInitializer = _initializers[i];
|
|
63
|
+
if (telemetryInitializer) {
|
|
64
|
+
try {
|
|
65
|
+
if (telemetryInitializer.fn.apply(null, [item]) === false) {
|
|
66
|
+
doNotSendItem = true;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
} catch (e) {
|
|
70
|
+
// log error but dont stop executing rest of the telemetry initializers
|
|
71
|
+
// doNotSendItem = true;
|
|
72
|
+
_throwInternal(
|
|
73
|
+
itemCtx.diagLog(),
|
|
74
|
+
eLoggingSeverity.CRITICAL,
|
|
75
|
+
_eInternalMessageId.TelemetryInitializerFailed,
|
|
76
|
+
"One of telemetry initializers failed, telemetry item will not be sent: " + getExceptionName(e),
|
|
77
|
+
{ exception: dumpObj(e) }, true);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (!doNotSendItem) {
|
|
83
|
+
_self.processNext(item, itemCtx);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
_self[strDoTeardown] = () => {
|
|
88
|
+
_initDefaults();
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
function _initDefaults() {
|
|
93
|
+
_id = 0;
|
|
94
|
+
_initializers = [];
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Add a telemetry processor to decorate or drop telemetry events.
|
|
100
|
+
* @param telemetryInitializer - The Telemetry Initializer function
|
|
101
|
+
* @returns - A ITelemetryInitializerHandler to enable the initializer to be removed
|
|
102
|
+
*/
|
|
103
|
+
public addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler {
|
|
104
|
+
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void {
|
|
109
|
+
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { eLoggingSeverity, _eInternalMessageId } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
5
|
+
import { IProcessTelemetryUnloadContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
6
|
+
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
7
|
+
import { _throwInternal } from "./DiagnosticLogger";
|
|
8
|
+
import { dumpObj } from "./EnvUtils";
|
|
9
|
+
import { arrForEach } from "./HelperFuncs";
|
|
10
|
+
|
|
11
|
+
export type UnloadHandler = (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
12
|
+
|
|
13
|
+
export interface IUnloadHandlerContainer {
|
|
14
|
+
add: (handler: UnloadHandler) => void;
|
|
15
|
+
run: (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function createUnloadHandlerContainer() {
|
|
19
|
+
let handlers: UnloadHandler[] = [];
|
|
20
|
+
|
|
21
|
+
function _addHandler(handler: UnloadHandler) {
|
|
22
|
+
if (handler) {
|
|
23
|
+
handlers.push(handler);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function _runHandlers(unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) {
|
|
28
|
+
arrForEach(handlers, (handler) => {
|
|
29
|
+
try {
|
|
30
|
+
handler(unloadCtx, unloadState);
|
|
31
|
+
} catch (e) {
|
|
32
|
+
_throwInternal(
|
|
33
|
+
unloadCtx.diagLog(),
|
|
34
|
+
eLoggingSeverity.WARNING,
|
|
35
|
+
_eInternalMessageId.PluginException,
|
|
36
|
+
"Unexpected error calling unload handler - " + dumpObj(e));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
handlers = [];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
add: _addHandler,
|
|
44
|
+
run: _runHandlers
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
import { createEnumStyle } from "../JavaScriptSDK/HelperFuncs";
|
|
5
|
+
|
|
6
|
+
export const enum eLoggingSeverity {
|
|
4
7
|
/**
|
|
5
8
|
* Error will be sent as internal telemetry
|
|
6
9
|
*/
|
|
@@ -9,97 +12,191 @@ export enum LoggingSeverity {
|
|
|
9
12
|
/**
|
|
10
13
|
* Error will NOT be sent as internal telemetry, and will only be shown in browser console
|
|
11
14
|
*/
|
|
12
|
-
WARNING = 2
|
|
15
|
+
WARNING = 2
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export const LoggingSeverity = createEnumStyle<{ [key in (keyof typeof eLoggingSeverity)]: number; }>({
|
|
20
|
+
CRITICAL: eLoggingSeverity.CRITICAL,
|
|
21
|
+
WARNING: eLoggingSeverity.WARNING
|
|
22
|
+
});
|
|
23
|
+
export type LoggingSeverity = number | eLoggingSeverity;
|
|
24
|
+
|
|
25
|
+
export const enum _eInternalMessageId {
|
|
26
|
+
BrowserDoesNotSupportLocalStorage = 0,
|
|
27
|
+
BrowserCannotReadLocalStorage = 1,
|
|
28
|
+
BrowserCannotReadSessionStorage = 2,
|
|
29
|
+
BrowserCannotWriteLocalStorage = 3,
|
|
30
|
+
BrowserCannotWriteSessionStorage = 4,
|
|
31
|
+
BrowserFailedRemovalFromLocalStorage = 5,
|
|
32
|
+
BrowserFailedRemovalFromSessionStorage = 6,
|
|
33
|
+
CannotSendEmptyTelemetry = 7,
|
|
34
|
+
ClientPerformanceMathError = 8,
|
|
35
|
+
ErrorParsingAISessionCookie = 9,
|
|
36
|
+
ErrorPVCalc = 10,
|
|
37
|
+
ExceptionWhileLoggingError = 11,
|
|
38
|
+
FailedAddingTelemetryToBuffer = 12,
|
|
39
|
+
FailedMonitorAjaxAbort = 13,
|
|
40
|
+
FailedMonitorAjaxDur = 14,
|
|
41
|
+
FailedMonitorAjaxOpen = 15,
|
|
42
|
+
FailedMonitorAjaxRSC = 16,
|
|
43
|
+
FailedMonitorAjaxSend = 17,
|
|
44
|
+
FailedMonitorAjaxGetCorrelationHeader = 18,
|
|
45
|
+
FailedToAddHandlerForOnBeforeUnload = 19,
|
|
46
|
+
FailedToSendQueuedTelemetry = 20,
|
|
47
|
+
FailedToReportDataLoss = 21,
|
|
48
|
+
FlushFailed = 22,
|
|
49
|
+
MessageLimitPerPVExceeded = 23,
|
|
50
|
+
MissingRequiredFieldSpecification = 24,
|
|
51
|
+
NavigationTimingNotSupported = 25,
|
|
52
|
+
OnError = 26,
|
|
53
|
+
SessionRenewalDateIsZero = 27,
|
|
54
|
+
SenderNotInitialized = 28,
|
|
55
|
+
StartTrackEventFailed = 29,
|
|
56
|
+
StopTrackEventFailed = 30,
|
|
57
|
+
StartTrackFailed = 31,
|
|
58
|
+
StopTrackFailed = 32,
|
|
59
|
+
TelemetrySampledAndNotSent = 33,
|
|
60
|
+
TrackEventFailed = 34,
|
|
61
|
+
TrackExceptionFailed = 35,
|
|
62
|
+
TrackMetricFailed = 36,
|
|
63
|
+
TrackPVFailed = 37,
|
|
64
|
+
TrackPVFailedCalc = 38,
|
|
65
|
+
TrackTraceFailed = 39,
|
|
66
|
+
TransmissionFailed = 40,
|
|
67
|
+
FailedToSetStorageBuffer = 41,
|
|
68
|
+
FailedToRestoreStorageBuffer = 42,
|
|
69
|
+
InvalidBackendResponse = 43,
|
|
70
|
+
FailedToFixDepricatedValues = 44,
|
|
71
|
+
InvalidDurationValue = 45,
|
|
72
|
+
TelemetryEnvelopeInvalid = 46,
|
|
73
|
+
CreateEnvelopeError = 47,
|
|
74
|
+
|
|
75
|
+
// User actionable
|
|
76
|
+
CannotSerializeObject = 48,
|
|
77
|
+
CannotSerializeObjectNonSerializable = 49,
|
|
78
|
+
CircularReferenceDetected = 50,
|
|
79
|
+
ClearAuthContextFailed = 51,
|
|
80
|
+
ExceptionTruncated = 52,
|
|
81
|
+
IllegalCharsInName = 53,
|
|
82
|
+
ItemNotInArray = 54,
|
|
83
|
+
MaxAjaxPerPVExceeded = 55,
|
|
84
|
+
MessageTruncated = 56,
|
|
85
|
+
NameTooLong = 57,
|
|
86
|
+
SampleRateOutOfRange = 58,
|
|
87
|
+
SetAuthContextFailed = 59,
|
|
88
|
+
SetAuthContextFailedAccountName = 60,
|
|
89
|
+
StringValueTooLong = 61,
|
|
90
|
+
StartCalledMoreThanOnce = 62,
|
|
91
|
+
StopCalledWithoutStart = 63,
|
|
92
|
+
TelemetryInitializerFailed = 64,
|
|
93
|
+
TrackArgumentsNotSpecified = 65,
|
|
94
|
+
UrlTooLong = 66,
|
|
95
|
+
SessionStorageBufferFull = 67,
|
|
96
|
+
CannotAccessCookie = 68,
|
|
97
|
+
IdTooLong = 69,
|
|
98
|
+
InvalidEvent = 70,
|
|
99
|
+
FailedMonitorAjaxSetRequestHeader = 71,
|
|
100
|
+
SendBrowserInfoOnUserInit = 72,
|
|
101
|
+
PluginException = 73,
|
|
102
|
+
NotificationException = 74,
|
|
103
|
+
SnippetScriptLoadFailure = 99,
|
|
104
|
+
InvalidInstrumentationKey = 100,
|
|
105
|
+
CannotParseAiBlobValue = 101,
|
|
106
|
+
InvalidContentBlob = 102,
|
|
107
|
+
TrackPageActionEventFailed = 103,
|
|
108
|
+
FailedAddingCustomDefinedRequestContext = 104,
|
|
109
|
+
InMemoryStorageBufferFull = 105
|
|
13
110
|
}
|
|
14
111
|
|
|
15
112
|
/**
|
|
16
113
|
* Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered
|
|
17
114
|
*/
|
|
18
|
-
export const _InternalMessageId = {
|
|
115
|
+
export const _InternalMessageId = createEnumStyle<{ [key in (keyof typeof _eInternalMessageId)]: number; }>({
|
|
19
116
|
// Non user actionable
|
|
20
|
-
BrowserDoesNotSupportLocalStorage:
|
|
21
|
-
BrowserCannotReadLocalStorage:
|
|
22
|
-
BrowserCannotReadSessionStorage:
|
|
23
|
-
BrowserCannotWriteLocalStorage:
|
|
24
|
-
BrowserCannotWriteSessionStorage:
|
|
25
|
-
BrowserFailedRemovalFromLocalStorage:
|
|
26
|
-
BrowserFailedRemovalFromSessionStorage:
|
|
27
|
-
CannotSendEmptyTelemetry:
|
|
28
|
-
ClientPerformanceMathError:
|
|
29
|
-
ErrorParsingAISessionCookie:
|
|
30
|
-
ErrorPVCalc:
|
|
31
|
-
ExceptionWhileLoggingError:
|
|
32
|
-
FailedAddingTelemetryToBuffer:
|
|
33
|
-
FailedMonitorAjaxAbort:
|
|
34
|
-
FailedMonitorAjaxDur:
|
|
35
|
-
FailedMonitorAjaxOpen:
|
|
36
|
-
FailedMonitorAjaxRSC:
|
|
37
|
-
FailedMonitorAjaxSend:
|
|
38
|
-
FailedMonitorAjaxGetCorrelationHeader:
|
|
39
|
-
FailedToAddHandlerForOnBeforeUnload:
|
|
40
|
-
FailedToSendQueuedTelemetry:
|
|
41
|
-
FailedToReportDataLoss:
|
|
42
|
-
FlushFailed:
|
|
43
|
-
MessageLimitPerPVExceeded:
|
|
44
|
-
MissingRequiredFieldSpecification:
|
|
45
|
-
NavigationTimingNotSupported:
|
|
46
|
-
OnError:
|
|
47
|
-
SessionRenewalDateIsZero:
|
|
48
|
-
SenderNotInitialized:
|
|
49
|
-
StartTrackEventFailed:
|
|
50
|
-
StopTrackEventFailed:
|
|
51
|
-
StartTrackFailed:
|
|
52
|
-
StopTrackFailed:
|
|
53
|
-
TelemetrySampledAndNotSent:
|
|
54
|
-
TrackEventFailed:
|
|
55
|
-
TrackExceptionFailed:
|
|
56
|
-
TrackMetricFailed:
|
|
57
|
-
TrackPVFailed:
|
|
58
|
-
TrackPVFailedCalc:
|
|
59
|
-
TrackTraceFailed:
|
|
60
|
-
TransmissionFailed:
|
|
61
|
-
FailedToSetStorageBuffer:
|
|
62
|
-
FailedToRestoreStorageBuffer:
|
|
63
|
-
InvalidBackendResponse:
|
|
64
|
-
FailedToFixDepricatedValues:
|
|
65
|
-
InvalidDurationValue:
|
|
66
|
-
TelemetryEnvelopeInvalid:
|
|
67
|
-
CreateEnvelopeError:
|
|
117
|
+
BrowserDoesNotSupportLocalStorage: _eInternalMessageId.BrowserDoesNotSupportLocalStorage,
|
|
118
|
+
BrowserCannotReadLocalStorage: _eInternalMessageId.BrowserCannotReadLocalStorage,
|
|
119
|
+
BrowserCannotReadSessionStorage: _eInternalMessageId.BrowserCannotReadSessionStorage,
|
|
120
|
+
BrowserCannotWriteLocalStorage: _eInternalMessageId.BrowserCannotWriteLocalStorage,
|
|
121
|
+
BrowserCannotWriteSessionStorage: _eInternalMessageId.BrowserCannotWriteSessionStorage,
|
|
122
|
+
BrowserFailedRemovalFromLocalStorage: _eInternalMessageId.BrowserFailedRemovalFromLocalStorage,
|
|
123
|
+
BrowserFailedRemovalFromSessionStorage: _eInternalMessageId.BrowserFailedRemovalFromSessionStorage,
|
|
124
|
+
CannotSendEmptyTelemetry: _eInternalMessageId.CannotSendEmptyTelemetry,
|
|
125
|
+
ClientPerformanceMathError: _eInternalMessageId.ClientPerformanceMathError,
|
|
126
|
+
ErrorParsingAISessionCookie: _eInternalMessageId.ErrorParsingAISessionCookie,
|
|
127
|
+
ErrorPVCalc: _eInternalMessageId.ErrorPVCalc,
|
|
128
|
+
ExceptionWhileLoggingError: _eInternalMessageId.ExceptionWhileLoggingError,
|
|
129
|
+
FailedAddingTelemetryToBuffer: _eInternalMessageId.FailedAddingTelemetryToBuffer,
|
|
130
|
+
FailedMonitorAjaxAbort: _eInternalMessageId.FailedMonitorAjaxAbort,
|
|
131
|
+
FailedMonitorAjaxDur: _eInternalMessageId.FailedMonitorAjaxDur,
|
|
132
|
+
FailedMonitorAjaxOpen: _eInternalMessageId.FailedMonitorAjaxOpen,
|
|
133
|
+
FailedMonitorAjaxRSC: _eInternalMessageId.FailedMonitorAjaxRSC,
|
|
134
|
+
FailedMonitorAjaxSend: _eInternalMessageId.FailedMonitorAjaxSend,
|
|
135
|
+
FailedMonitorAjaxGetCorrelationHeader: _eInternalMessageId.FailedMonitorAjaxGetCorrelationHeader,
|
|
136
|
+
FailedToAddHandlerForOnBeforeUnload: _eInternalMessageId.FailedToAddHandlerForOnBeforeUnload,
|
|
137
|
+
FailedToSendQueuedTelemetry: _eInternalMessageId.FailedToSendQueuedTelemetry,
|
|
138
|
+
FailedToReportDataLoss: _eInternalMessageId.FailedToReportDataLoss,
|
|
139
|
+
FlushFailed: _eInternalMessageId.FlushFailed,
|
|
140
|
+
MessageLimitPerPVExceeded: _eInternalMessageId.MessageLimitPerPVExceeded,
|
|
141
|
+
MissingRequiredFieldSpecification: _eInternalMessageId.MissingRequiredFieldSpecification,
|
|
142
|
+
NavigationTimingNotSupported: _eInternalMessageId.NavigationTimingNotSupported,
|
|
143
|
+
OnError: _eInternalMessageId.OnError,
|
|
144
|
+
SessionRenewalDateIsZero: _eInternalMessageId.SessionRenewalDateIsZero,
|
|
145
|
+
SenderNotInitialized: _eInternalMessageId.SenderNotInitialized,
|
|
146
|
+
StartTrackEventFailed: _eInternalMessageId.StartTrackEventFailed,
|
|
147
|
+
StopTrackEventFailed: _eInternalMessageId.StopTrackEventFailed,
|
|
148
|
+
StartTrackFailed: _eInternalMessageId.StartTrackFailed,
|
|
149
|
+
StopTrackFailed: _eInternalMessageId.StopTrackFailed,
|
|
150
|
+
TelemetrySampledAndNotSent: _eInternalMessageId.TelemetrySampledAndNotSent,
|
|
151
|
+
TrackEventFailed: _eInternalMessageId.TrackEventFailed,
|
|
152
|
+
TrackExceptionFailed: _eInternalMessageId.TrackExceptionFailed,
|
|
153
|
+
TrackMetricFailed: _eInternalMessageId.TrackMetricFailed,
|
|
154
|
+
TrackPVFailed: _eInternalMessageId.TrackPVFailed,
|
|
155
|
+
TrackPVFailedCalc: _eInternalMessageId.TrackPVFailedCalc,
|
|
156
|
+
TrackTraceFailed: _eInternalMessageId.TrackTraceFailed,
|
|
157
|
+
TransmissionFailed: _eInternalMessageId.TransmissionFailed,
|
|
158
|
+
FailedToSetStorageBuffer: _eInternalMessageId.FailedToSetStorageBuffer,
|
|
159
|
+
FailedToRestoreStorageBuffer: _eInternalMessageId.FailedToRestoreStorageBuffer,
|
|
160
|
+
InvalidBackendResponse: _eInternalMessageId.InvalidBackendResponse,
|
|
161
|
+
FailedToFixDepricatedValues: _eInternalMessageId.FailedToFixDepricatedValues,
|
|
162
|
+
InvalidDurationValue: _eInternalMessageId.InvalidDurationValue,
|
|
163
|
+
TelemetryEnvelopeInvalid: _eInternalMessageId.TelemetryEnvelopeInvalid,
|
|
164
|
+
CreateEnvelopeError: _eInternalMessageId.CreateEnvelopeError,
|
|
68
165
|
|
|
69
166
|
// User actionable
|
|
70
|
-
CannotSerializeObject:
|
|
71
|
-
CannotSerializeObjectNonSerializable:
|
|
72
|
-
CircularReferenceDetected:
|
|
73
|
-
ClearAuthContextFailed:
|
|
74
|
-
ExceptionTruncated:
|
|
75
|
-
IllegalCharsInName:
|
|
76
|
-
ItemNotInArray:
|
|
77
|
-
MaxAjaxPerPVExceeded:
|
|
78
|
-
MessageTruncated:
|
|
79
|
-
NameTooLong:
|
|
80
|
-
SampleRateOutOfRange:
|
|
81
|
-
SetAuthContextFailed:
|
|
82
|
-
SetAuthContextFailedAccountName:
|
|
83
|
-
StringValueTooLong:
|
|
84
|
-
StartCalledMoreThanOnce:
|
|
85
|
-
StopCalledWithoutStart:
|
|
86
|
-
TelemetryInitializerFailed:
|
|
87
|
-
TrackArgumentsNotSpecified:
|
|
88
|
-
UrlTooLong:
|
|
89
|
-
SessionStorageBufferFull:
|
|
90
|
-
CannotAccessCookie:
|
|
91
|
-
IdTooLong:
|
|
92
|
-
InvalidEvent:
|
|
93
|
-
FailedMonitorAjaxSetRequestHeader:
|
|
94
|
-
SendBrowserInfoOnUserInit:
|
|
95
|
-
PluginException:
|
|
96
|
-
NotificationException:
|
|
97
|
-
SnippetScriptLoadFailure:
|
|
98
|
-
InvalidInstrumentationKey:
|
|
99
|
-
CannotParseAiBlobValue:
|
|
100
|
-
InvalidContentBlob:
|
|
101
|
-
TrackPageActionEventFailed:
|
|
102
|
-
FailedAddingCustomDefinedRequestContext:
|
|
103
|
-
InMemoryStorageBufferFull:
|
|
104
|
-
};
|
|
105
|
-
export type _InternalMessageId = number |
|
|
167
|
+
CannotSerializeObject: _eInternalMessageId.CannotSerializeObject,
|
|
168
|
+
CannotSerializeObjectNonSerializable: _eInternalMessageId.CannotSerializeObjectNonSerializable,
|
|
169
|
+
CircularReferenceDetected: _eInternalMessageId.CircularReferenceDetected,
|
|
170
|
+
ClearAuthContextFailed: _eInternalMessageId.ClearAuthContextFailed,
|
|
171
|
+
ExceptionTruncated: _eInternalMessageId.ExceptionTruncated,
|
|
172
|
+
IllegalCharsInName: _eInternalMessageId.IllegalCharsInName,
|
|
173
|
+
ItemNotInArray: _eInternalMessageId.ItemNotInArray,
|
|
174
|
+
MaxAjaxPerPVExceeded: _eInternalMessageId.MaxAjaxPerPVExceeded,
|
|
175
|
+
MessageTruncated: _eInternalMessageId.MessageTruncated,
|
|
176
|
+
NameTooLong: _eInternalMessageId.NameTooLong,
|
|
177
|
+
SampleRateOutOfRange: _eInternalMessageId.SampleRateOutOfRange,
|
|
178
|
+
SetAuthContextFailed: _eInternalMessageId.SetAuthContextFailed,
|
|
179
|
+
SetAuthContextFailedAccountName: _eInternalMessageId.SetAuthContextFailedAccountName,
|
|
180
|
+
StringValueTooLong: _eInternalMessageId.StringValueTooLong,
|
|
181
|
+
StartCalledMoreThanOnce: _eInternalMessageId.StartCalledMoreThanOnce,
|
|
182
|
+
StopCalledWithoutStart: _eInternalMessageId.StopCalledWithoutStart,
|
|
183
|
+
TelemetryInitializerFailed: _eInternalMessageId.TelemetryInitializerFailed,
|
|
184
|
+
TrackArgumentsNotSpecified: _eInternalMessageId.TrackArgumentsNotSpecified,
|
|
185
|
+
UrlTooLong: _eInternalMessageId.UrlTooLong,
|
|
186
|
+
SessionStorageBufferFull: _eInternalMessageId.SessionStorageBufferFull,
|
|
187
|
+
CannotAccessCookie: _eInternalMessageId.CannotAccessCookie,
|
|
188
|
+
IdTooLong: _eInternalMessageId.IdTooLong,
|
|
189
|
+
InvalidEvent: _eInternalMessageId.InvalidEvent,
|
|
190
|
+
FailedMonitorAjaxSetRequestHeader: _eInternalMessageId.FailedMonitorAjaxSetRequestHeader,
|
|
191
|
+
SendBrowserInfoOnUserInit: _eInternalMessageId.SendBrowserInfoOnUserInit,
|
|
192
|
+
PluginException: _eInternalMessageId.PluginException,
|
|
193
|
+
NotificationException: _eInternalMessageId.NotificationException,
|
|
194
|
+
SnippetScriptLoadFailure: _eInternalMessageId.SnippetScriptLoadFailure,
|
|
195
|
+
InvalidInstrumentationKey: _eInternalMessageId.InvalidInstrumentationKey,
|
|
196
|
+
CannotParseAiBlobValue: _eInternalMessageId.CannotParseAiBlobValue,
|
|
197
|
+
InvalidContentBlob: _eInternalMessageId.InvalidContentBlob,
|
|
198
|
+
TrackPageActionEventFailed: _eInternalMessageId.TrackPageActionEventFailed,
|
|
199
|
+
FailedAddingCustomDefinedRequestContext: _eInternalMessageId.FailedAddingCustomDefinedRequestContext,
|
|
200
|
+
InMemoryStorageBufferFull: _eInternalMessageId.InMemoryStorageBufferFull
|
|
201
|
+
});
|
|
202
|
+
export type _InternalMessageId = number | _eInternalMessageId;
|