@microsoft/applicationinsights-core-js 2.7.5-nightly.2203-03 → 2.7.5

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.
Files changed (160) hide show
  1. package/browser/applicationinsights-core-js.integrity.json +9 -9
  2. package/browser/applicationinsights-core-js.js +766 -1967
  3. package/browser/applicationinsights-core-js.js.map +1 -1
  4. package/browser/applicationinsights-core-js.min.js +2 -2
  5. package/browser/applicationinsights-core-js.min.js.map +1 -1
  6. package/dist/applicationinsights-core-js.api.json +9840 -16439
  7. package/dist/applicationinsights-core-js.api.md +48 -425
  8. package/dist/applicationinsights-core-js.d.ts +123 -784
  9. package/dist/applicationinsights-core-js.js +766 -1967
  10. package/dist/applicationinsights-core-js.js.map +1 -1
  11. package/dist/applicationinsights-core-js.min.js +2 -2
  12. package/dist/applicationinsights-core-js.min.js.map +1 -1
  13. package/dist/applicationinsights-core-js.rollup.d.ts +123 -784
  14. package/dist-esm/JavaScriptSDK/AppInsightsCore.js +69 -3
  15. package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
  16. package/dist-esm/JavaScriptSDK/BaseCore.js +99 -496
  17. package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
  18. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +21 -120
  19. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
  20. package/dist-esm/JavaScriptSDK/ChannelController.js +87 -202
  21. package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
  22. package/dist-esm/JavaScriptSDK/Constants.js +1 -1
  23. package/dist-esm/JavaScriptSDK/CookieMgr.js +4 -4
  24. package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
  25. package/dist-esm/JavaScriptSDK/CoreUtils.js +148 -7
  26. package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
  27. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
  28. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +14 -27
  29. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
  30. package/dist-esm/JavaScriptSDK/EnvUtils.js +12 -13
  31. package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
  32. package/dist-esm/JavaScriptSDK/HelperFuncs.js +86 -89
  33. package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
  34. package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -3
  35. package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +1 -1
  36. package/dist-esm/JavaScriptSDK/NotificationManager.js +42 -37
  37. package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
  38. package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
  39. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +119 -430
  40. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
  41. package/dist-esm/JavaScriptSDK/RandomHelper.js +4 -30
  42. package/dist-esm/JavaScriptSDK/RandomHelper.js.map +1 -1
  43. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +14 -60
  44. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
  45. package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js +76 -0
  46. package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js.map +1 -0
  47. package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  48. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +96 -90
  49. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js.map +1 -1
  50. package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  51. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +2 -1
  52. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js.map +1 -1
  53. package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  54. package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  55. package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  56. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
  57. package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  58. package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  59. package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  60. package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  61. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  62. package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  63. package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  64. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  65. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  66. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +2 -1
  67. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js.map +1 -1
  68. package/dist-esm/applicationinsights-core-js.js +7 -12
  69. package/dist-esm/applicationinsights-core-js.js.map +1 -1
  70. package/package.json +67 -70
  71. package/src/JavaScriptSDK/AppInsightsCore.ts +101 -2
  72. package/src/JavaScriptSDK/BaseCore.ts +120 -696
  73. package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +31 -205
  74. package/src/JavaScriptSDK/ChannelController.ts +103 -242
  75. package/src/JavaScriptSDK/CookieMgr.ts +5 -7
  76. package/src/JavaScriptSDK/CoreUtils.ts +172 -8
  77. package/src/JavaScriptSDK/DiagnosticLogger.ts +14 -29
  78. package/src/JavaScriptSDK/EnvUtils.ts +12 -13
  79. package/src/JavaScriptSDK/HelperFuncs.ts +97 -123
  80. package/src/JavaScriptSDK/InstrumentHooks.ts +2 -4
  81. package/src/JavaScriptSDK/NotificationManager.ts +37 -34
  82. package/src/JavaScriptSDK/PerfManager.ts +7 -4
  83. package/src/JavaScriptSDK/ProcessTelemetryContext.ts +134 -543
  84. package/src/JavaScriptSDK/RandomHelper.ts +3 -35
  85. package/src/JavaScriptSDK/TelemetryHelpers.ts +21 -83
  86. package/src/JavaScriptSDK/TelemetryPluginChain.ts +120 -0
  87. package/src/JavaScriptSDK.Enums/LoggingEnums.ts +87 -184
  88. package/src/JavaScriptSDK.Enums/SendRequestReason.ts +0 -5
  89. package/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts +2 -82
  90. package/src/JavaScriptSDK.Interfaces/IChannelControls.ts +5 -16
  91. package/src/JavaScriptSDK.Interfaces/IInstrumentHooks.ts +6 -16
  92. package/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts +14 -94
  93. package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +10 -28
  94. package/src/JavaScriptSDK.Interfaces/ITelemetryPluginChain.ts +11 -9
  95. package/types/JavaScriptSDK/AppInsightsCore.d.ts +21 -0
  96. package/types/JavaScriptSDK/BaseCore.d.ts +3 -81
  97. package/types/JavaScriptSDK/BaseTelemetryPlugin.d.ts +10 -53
  98. package/types/JavaScriptSDK/ChannelController.d.ts +17 -16
  99. package/types/JavaScriptSDK/CoreUtils.d.ts +48 -1
  100. package/types/JavaScriptSDK/DiagnosticLogger.d.ts +0 -10
  101. package/types/JavaScriptSDK/HelperFuncs.d.ts +32 -33
  102. package/types/JavaScriptSDK/PerfManager.d.ts +1 -1
  103. package/types/JavaScriptSDK/ProcessTelemetryContext.d.ts +6 -69
  104. package/types/JavaScriptSDK/RandomHelper.d.ts +0 -6
  105. package/types/JavaScriptSDK/TelemetryHelpers.d.ts +3 -23
  106. package/types/JavaScriptSDK/TelemetryPluginChain.d.ts +32 -0
  107. package/types/JavaScriptSDK.Enums/LoggingEnums.d.ts +2 -91
  108. package/types/JavaScriptSDK.Enums/SendRequestReason.d.ts +0 -4
  109. package/types/JavaScriptSDK.Interfaces/IAppInsightsCore.d.ts +1 -72
  110. package/types/JavaScriptSDK.Interfaces/IChannelControls.d.ts +5 -16
  111. package/types/JavaScriptSDK.Interfaces/IInstrumentHooks.d.ts +0 -9
  112. package/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext.d.ts +11 -82
  113. package/types/JavaScriptSDK.Interfaces/ITelemetryPlugin.d.ts +8 -25
  114. package/types/JavaScriptSDK.Interfaces/ITelemetryPluginChain.d.ts +10 -9
  115. package/types/applicationinsights-core-js.d.ts +9 -18
  116. package/types/tsdoc-metadata.json +1 -1
  117. package/dist-esm/JavaScriptSDK/DataCacheHelper.js +0 -93
  118. package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +0 -1
  119. package/dist-esm/JavaScriptSDK/EventHelpers.js +0 -477
  120. package/dist-esm/JavaScriptSDK/EventHelpers.js.map +0 -1
  121. package/dist-esm/JavaScriptSDK/InternalConstants.js +0 -28
  122. package/dist-esm/JavaScriptSDK/InternalConstants.js.map +0 -1
  123. package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +0 -81
  124. package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +0 -1
  125. package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +0 -33
  126. package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js.map +0 -1
  127. package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +0 -8
  128. package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js.map +0 -1
  129. package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +0 -8
  130. package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js.map +0 -1
  131. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +0 -6
  132. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js.map +0 -1
  133. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +0 -8
  134. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js.map +0 -1
  135. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +0 -8
  136. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js.map +0 -1
  137. package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +0 -6
  138. package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js.map +0 -1
  139. package/src/JavaScriptSDK/DataCacheHelper.ts +0 -106
  140. package/src/JavaScriptSDK/EventHelpers.ts +0 -550
  141. package/src/JavaScriptSDK/InternalConstants.ts +0 -26
  142. package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +0 -111
  143. package/src/JavaScriptSDK/UnloadHandlerContainer.ts +0 -46
  144. package/src/JavaScriptSDK.Enums/TelemetryUnloadReason.ts +0 -27
  145. package/src/JavaScriptSDK.Enums/TelemetryUpdateReason.ts +0 -27
  146. package/src/JavaScriptSDK.Interfaces/ITelemetryInitializers.ts +0 -16
  147. package/src/JavaScriptSDK.Interfaces/ITelemetryUnloadState.ts +0 -10
  148. package/src/JavaScriptSDK.Interfaces/ITelemetryUpdateState.ts +0 -34
  149. package/src/JavaScriptSDK.Interfaces/IUnloadableComponent.ts +0 -17
  150. package/types/JavaScriptSDK/DataCacheHelper.d.ts +0 -13
  151. package/types/JavaScriptSDK/EventHelpers.d.ts +0 -154
  152. package/types/JavaScriptSDK/InternalConstants.d.ts +0 -20
  153. package/types/JavaScriptSDK/TelemetryInitializerPlugin.d.ts +0 -16
  154. package/types/JavaScriptSDK/UnloadHandlerContainer.d.ts +0 -11
  155. package/types/JavaScriptSDK.Enums/TelemetryUnloadReason.d.ts +0 -21
  156. package/types/JavaScriptSDK.Enums/TelemetryUpdateReason.d.ts +0 -20
  157. package/types/JavaScriptSDK.Interfaces/ITelemetryInitializers.d.ts +0 -13
  158. package/types/JavaScriptSDK.Interfaces/ITelemetryUnloadState.d.ts +0 -6
  159. package/types/JavaScriptSDK.Interfaces/ITelemetryUpdateState.d.ts +0 -22
  160. package/types/JavaScriptSDK.Interfaces/IUnloadableComponent.d.ts +0 -13
@@ -1 +1 @@
1
- {"version":3,"file":"ProcessTelemetryContext.js.map","sources":["ProcessTelemetryContext.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nimport { safeGetLogger, _throwInternal } from \"./DiagnosticLogger\";\r\nimport { arrForEach, isArray, isFunction, isNullOrUndefined, isObject, isUndefined, objExtend, objForEachKey, objFreeze, objKeys, proxyFunctions } from \"./HelperFuncs\";\r\nimport { doPerf } from \"./PerfManager\";\r\nimport { dumpObj } from \"./EnvUtils\";\r\nimport { strCore, strDisabled, strEmpty, strIsInitialized, strTeardown, strUpdate } from \"./InternalConstants\";\r\nimport { _getPluginState } from \"./TelemetryHelpers\";\r\nvar strTelemetryPluginChain = \"TelemetryPluginChain\";\r\nvar strHasRunFlags = \"_hasRun\";\r\nvar strGetTelCtx = \"_getTelCtx\";\r\nvar _chainId = 0;\r\nfunction _getNextProxyStart(proxy, config, core, startAt) {\r\n while (proxy) {\r\n if (proxy.getPlugin() === startAt) {\r\n return proxy;\r\n }\r\n proxy = proxy.getNext();\r\n }\r\n // This wasn't found in the existing chain so create an isolated one with just this plugin\r\n return createTelemetryProxyChain([startAt], config, core);\r\n}\r\n/**\r\n * @ignore\r\n * @param telemetryChain\r\n * @param config\r\n * @param core\r\n * @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\r\n * @returns\r\n */\r\nfunction _createInternalContext(telemetryChain, config, core, startAt) {\r\n // We have a special case where we want to start execution from this specific plugin\r\n // or we simply reuse the existing telemetry plugin chain (normal execution case)\r\n var _nextProxy = null; // By Default set as no next plugin\r\n var _onComplete = [];\r\n if (startAt !== null) {\r\n // There is no next element (null) vs not defined (undefined) so use the full chain\r\n _nextProxy = startAt ? _getNextProxyStart(telemetryChain, config, core, startAt) : telemetryChain;\r\n }\r\n var context = {\r\n _next: _moveNext,\r\n ctx: {\r\n core: function () {\r\n return core;\r\n },\r\n diagLog: function () {\r\n return safeGetLogger(core, config);\r\n },\r\n getCfg: function () {\r\n return config;\r\n },\r\n getExtCfg: _getExtCfg,\r\n getConfig: _getConfig,\r\n hasNext: function () {\r\n return !!_nextProxy;\r\n },\r\n getNext: function () {\r\n return _nextProxy;\r\n },\r\n setNext: function (nextPlugin) {\r\n _nextProxy = nextPlugin;\r\n },\r\n iterate: _iterateChain,\r\n onComplete: _addOnComplete\r\n }\r\n };\r\n function _addOnComplete(onComplete, that) {\r\n var args = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n args[_i - 2] = arguments[_i];\r\n }\r\n if (onComplete) {\r\n _onComplete.push({\r\n func: onComplete,\r\n self: !isUndefined(that) ? that : context.ctx,\r\n args: args\r\n });\r\n }\r\n }\r\n function _moveNext() {\r\n var nextProxy = _nextProxy;\r\n // Automatically move to the next plugin\r\n _nextProxy = nextProxy ? nextProxy.getNext() : null;\r\n if (!nextProxy) {\r\n var onComplete = _onComplete;\r\n if (onComplete && onComplete.length > 0) {\r\n arrForEach(onComplete, function (completeDetails) {\r\n try {\r\n completeDetails.func.call(completeDetails.self, completeDetails.args);\r\n }\r\n catch (e) {\r\n _throwInternal(core.logger, 2 /* WARNING */, 73 /* PluginException */, \"Unexpected Exception during onComplete - \" + dumpObj(e));\r\n }\r\n });\r\n _onComplete = [];\r\n }\r\n }\r\n return nextProxy;\r\n }\r\n function _getExtCfg(identifier, defaultValue, mergeDefault) {\r\n if (defaultValue === void 0) { defaultValue = {}; }\r\n if (mergeDefault === void 0) { mergeDefault = 0 /* None */; }\r\n var theConfig;\r\n if (config) {\r\n var extConfig = config.extensionConfig;\r\n if (extConfig && identifier) {\r\n theConfig = extConfig[identifier];\r\n }\r\n }\r\n if (!theConfig) {\r\n // Just use the defaults\r\n theConfig = defaultValue;\r\n }\r\n else if (isObject(defaultValue)) {\r\n if (mergeDefault !== 0 /* None */) {\r\n // Merge the defaults and configured values\r\n var newConfig_1 = objExtend(true, defaultValue, theConfig);\r\n if (config && mergeDefault === 2 /* MergeDefaultFromRootOrDefault */) {\r\n // Enumerate over the defaultValues and if not already populate attempt to\r\n // find a value from the root config\r\n objForEachKey(defaultValue, function (field) {\r\n // for each unspecified field, set the default value\r\n if (isNullOrUndefined(newConfig_1[field])) {\r\n var cfgValue = config[field];\r\n if (!isNullOrUndefined(cfgValue)) {\r\n newConfig_1[field] = cfgValue;\r\n }\r\n }\r\n });\r\n }\r\n }\r\n }\r\n return theConfig;\r\n }\r\n function _getConfig(identifier, field, defaultValue) {\r\n if (defaultValue === void 0) { defaultValue = false; }\r\n var theValue;\r\n var extConfig = _getExtCfg(identifier, null);\r\n if (extConfig && !isNullOrUndefined(extConfig[field])) {\r\n theValue = extConfig[field];\r\n }\r\n else if (config && !isNullOrUndefined(config[field])) {\r\n theValue = config[field];\r\n }\r\n return !isNullOrUndefined(theValue) ? theValue : defaultValue;\r\n }\r\n function _iterateChain(cb) {\r\n // Keep processing until we reach the end of the chain\r\n var nextPlugin;\r\n while (!!(nextPlugin = context._next())) {\r\n var plugin = nextPlugin.getPlugin();\r\n if (plugin) {\r\n // callback with the current on\r\n cb(plugin);\r\n }\r\n }\r\n }\r\n return context;\r\n}\r\n/**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n * @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\r\n */\r\nexport function createProcessTelemetryContext(telemetryChain, config, core, startAt) {\r\n var internalContext = _createInternalContext(telemetryChain, config, core, startAt);\r\n var context = internalContext.ctx;\r\n function _processNext(env) {\r\n var nextPlugin = internalContext._next();\r\n // Run the next plugin which will call \"processNext()\"\r\n nextPlugin && nextPlugin.processTelemetry(env, context);\r\n return !nextPlugin;\r\n }\r\n function _createNew(plugins, startAt) {\r\n if (plugins === void 0) { plugins = null; }\r\n if (isArray(plugins)) {\r\n plugins = createTelemetryProxyChain(plugins, config, core, startAt);\r\n }\r\n return createProcessTelemetryContext(plugins || context.getNext(), config, core, startAt);\r\n }\r\n context.processNext = _processNext;\r\n context.createNew = _createNew;\r\n return context;\r\n}\r\n/**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain for handling the unloading of the chain\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n * @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\r\n */\r\nexport function createProcessTelemetryUnloadContext(telemetryChain, config, core, startAt) {\r\n var internalContext = _createInternalContext(telemetryChain, config, core, startAt);\r\n var context = internalContext.ctx;\r\n function _processNext(unloadState) {\r\n var nextPlugin = internalContext._next();\r\n nextPlugin && nextPlugin.unload(context, unloadState);\r\n return !nextPlugin;\r\n }\r\n function _createNew(plugins, startAt) {\r\n if (plugins === void 0) { plugins = null; }\r\n if (isArray(plugins)) {\r\n plugins = createTelemetryProxyChain(plugins, config, core, startAt);\r\n }\r\n return createProcessTelemetryUnloadContext(plugins || context.getNext(), config, core, startAt);\r\n }\r\n context.processNext = _processNext;\r\n context.createNew = _createNew;\r\n return context;\r\n}\r\n/**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain for updating the configuration\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n * @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\r\n */\r\nexport function createProcessTelemetryUpdateContext(telemetryChain, config, core, startAt) {\r\n var internalContext = _createInternalContext(telemetryChain, config, core, startAt);\r\n var context = internalContext.ctx;\r\n function _processNext(updateState) {\r\n return context.iterate(function (plugin) {\r\n if (isFunction(plugin[strUpdate])) {\r\n plugin[strUpdate](context, updateState);\r\n }\r\n });\r\n }\r\n function _createNew(plugins, startAt) {\r\n if (plugins === void 0) { plugins = null; }\r\n if (isArray(plugins)) {\r\n plugins = createTelemetryProxyChain(plugins, config, core, startAt);\r\n }\r\n return createProcessTelemetryUpdateContext(plugins || context.getNext(), config, core, startAt);\r\n }\r\n context.processNext = _processNext;\r\n context.createNew = _createNew;\r\n return context;\r\n}\r\n/**\r\n * Creates an execution chain from the array of plugins\r\n * @param plugins - The array of plugins that will be executed in this order\r\n * @param defItemCtx - The default execution context to use when no telemetry context is passed to processTelemetry(), this\r\n * should be for legacy plugins only. Currently, only used for passing the current core instance and to provide better error\r\n * reporting (hasRun) when errors occur.\r\n */\r\nexport function createTelemetryProxyChain(plugins, config, core, startAt) {\r\n var firstProxy = null;\r\n var add = startAt ? false : true;\r\n if (isArray(plugins) && plugins.length > 0) {\r\n // Create the proxies and wire up the next plugin chain\r\n var lastProxy_1 = null;\r\n arrForEach(plugins, function (thePlugin) {\r\n if (!add && startAt === thePlugin) {\r\n add = true;\r\n }\r\n if (add && thePlugin && isFunction(thePlugin.processTelemetry)) {\r\n // Only add plugins that are processors\r\n var newProxy = createTelemetryPluginProxy(thePlugin, config, core);\r\n if (!firstProxy) {\r\n firstProxy = newProxy;\r\n }\r\n if (lastProxy_1) {\r\n // Set this new proxy as the next for the previous one\r\n lastProxy_1._setNext(newProxy);\r\n }\r\n lastProxy_1 = newProxy;\r\n }\r\n });\r\n }\r\n if (startAt && !firstProxy) {\r\n // Special case where the \"startAt\" was not in the original list of plugins\r\n return createTelemetryProxyChain([startAt], config, core);\r\n }\r\n return firstProxy;\r\n}\r\n/**\r\n * Create the processing telemetry proxy instance, the proxy is used to abstract the current plugin to allow monitoring and\r\n * execution plugins while passing around the dynamic execution state (IProcessTelemetryContext), the proxy instance no longer\r\n * contains any execution state and can be reused between requests (this was not the case for 2.7.2 and earlier with the\r\n * TelemetryPluginChain class).\r\n * @param plugin - The plugin instance to proxy\r\n * @param config - The default execution context to use when no telemetry context is passed to processTelemetry(), this\r\n * should be for legacy plugins only. Currently, only used for passing the current core instance and to provide better error\r\n * reporting (hasRun) when errors occur.\r\n * @returns\r\n */\r\nexport function createTelemetryPluginProxy(plugin, config, core) {\r\n var nextProxy = null;\r\n var hasProcessTelemetry = isFunction(plugin.processTelemetry);\r\n var hasSetNext = isFunction(plugin.setNextPlugin);\r\n var chainId;\r\n if (plugin) {\r\n chainId = plugin.identifier + \"-\" + plugin.priority + \"-\" + _chainId++;\r\n }\r\n else {\r\n chainId = \"Unknown-0-\" + _chainId++;\r\n }\r\n var proxyChain = {\r\n getPlugin: function () {\r\n return plugin;\r\n },\r\n getNext: function () {\r\n return nextProxy;\r\n },\r\n processTelemetry: _processTelemetry,\r\n unload: _unloadPlugin,\r\n update: _updatePlugin,\r\n _id: chainId,\r\n _setNext: function (nextPlugin) {\r\n nextProxy = nextPlugin;\r\n }\r\n };\r\n function _getTelCtx() {\r\n var itemCtx;\r\n // Looks like a plugin didn't pass the (optional) context, so create a new one\r\n if (plugin && isFunction(plugin[strGetTelCtx])) {\r\n // This plugin extends from the BaseTelemetryPlugin so lets use it\r\n itemCtx = plugin[strGetTelCtx]();\r\n }\r\n if (!itemCtx) {\r\n // Create a temporary one\r\n itemCtx = createProcessTelemetryContext(proxyChain, config, core);\r\n }\r\n return itemCtx;\r\n }\r\n function _processChain(itemCtx, processPluginFn, name, details, isAsync) {\r\n var hasRun = false;\r\n var identifier = plugin ? plugin.identifier : strTelemetryPluginChain;\r\n var hasRunContext = itemCtx[strHasRunFlags];\r\n if (!hasRunContext) {\r\n // Assign and populate\r\n hasRunContext = itemCtx[strHasRunFlags] = {};\r\n }\r\n // Ensure that we keep the context in sync\r\n itemCtx.setNext(nextProxy);\r\n if (plugin) {\r\n doPerf(itemCtx[strCore](), function () { return identifier + \":\" + name; }, function () {\r\n // Mark this component as having run\r\n hasRunContext[chainId] = true;\r\n try {\r\n // Set a flag on the next plugin so we know if it was attempted to be executed\r\n var nextId = nextProxy ? nextProxy._id : strEmpty;\r\n if (nextId) {\r\n hasRunContext[nextId] = false;\r\n }\r\n hasRun = processPluginFn(itemCtx);\r\n }\r\n catch (error) {\r\n var hasNextRun = nextProxy ? hasRunContext[nextProxy._id] : true;\r\n if (hasNextRun) {\r\n // The next plugin after us has already run so set this one as complete\r\n hasRun = true;\r\n }\r\n if (!nextProxy || !hasNextRun) {\r\n // Either we have no next plugin or the current one did not attempt to call the next plugin\r\n // Which means the current one is the root of the failure so log/report this failure\r\n _throwInternal(itemCtx.diagLog(), 1 /* CRITICAL */, 73 /* PluginException */, \"Plugin [\" + plugin.identifier + \"] failed during \" + name + \" - \" + dumpObj(error) + \", run flags: \" + dumpObj(hasRunContext));\r\n }\r\n }\r\n }, details, isAsync);\r\n }\r\n return hasRun;\r\n }\r\n function _processTelemetry(env, itemCtx) {\r\n itemCtx = itemCtx || _getTelCtx();\r\n function _callProcessTelemetry(itemCtx) {\r\n if (!plugin || !hasProcessTelemetry) {\r\n return false;\r\n }\r\n var pluginState = _getPluginState(plugin);\r\n if (pluginState[strTeardown] || pluginState[strDisabled]) {\r\n return false;\r\n }\r\n // Ensure that we keep the context in sync (for processNext()), just in case a plugin\r\n // doesn't calls processTelemetry() instead of itemContext.processNext() or some\r\n // other form of error occurred\r\n if (hasSetNext) {\r\n // Backward compatibility setting the next plugin on the instance\r\n plugin.setNextPlugin(nextProxy);\r\n }\r\n plugin.processTelemetry(env, itemCtx);\r\n // Process Telemetry is expected to call itemCtx.processNext() or nextPlugin.processTelemetry()\r\n return true;\r\n }\r\n if (!_processChain(itemCtx, _callProcessTelemetry, \"processTelemetry\", function () { return ({ item: env }); }, !(env.sync))) {\r\n // The underlying plugin is either not defined, not enabled or does not have a processTelemetry implementation\r\n // so we still want the next plugin to be executed.\r\n itemCtx.processNext(env);\r\n }\r\n }\r\n function _unloadPlugin(unloadCtx, unloadState) {\r\n function _callTeardown() {\r\n // Setting default of hasRun as false so the proxyProcessFn() is called as teardown() doesn't have to exist or call unloadNext().\r\n var hasRun = false;\r\n if (plugin) {\r\n var pluginState = _getPluginState(plugin);\r\n var pluginCore = plugin[strCore] || pluginState.core;\r\n // Only teardown the plugin if it was initialized by the current core (i.e. It's not a shared plugin)\r\n if (plugin && (!pluginCore || pluginCore === unloadCtx[strCore]()) && !pluginState[strTeardown]) {\r\n // Handle plugins that don't extend from the BaseTelemetryPlugin\r\n pluginState[strCore] = null;\r\n pluginState[strTeardown] = true;\r\n pluginState[strIsInitialized] = false;\r\n if (plugin[strTeardown] && plugin[strTeardown](unloadCtx, unloadState) === true) {\r\n // plugin told us that it was going to (or has) call unloadCtx.processNext()\r\n hasRun = true;\r\n }\r\n }\r\n }\r\n return hasRun;\r\n }\r\n if (!_processChain(unloadCtx, _callTeardown, \"unload\", function () { }, unloadState.isAsync)) {\r\n // Only called if we hasRun was not true\r\n unloadCtx.processNext(unloadState);\r\n }\r\n }\r\n function _updatePlugin(updateCtx, updateState) {\r\n function _callUpdate() {\r\n // Setting default of hasRun as false so the proxyProcessFn() is called as teardown() doesn't have to exist or call unloadNext().\r\n var hasRun = false;\r\n if (plugin) {\r\n var pluginState = _getPluginState(plugin);\r\n var pluginCore = plugin[strCore] || pluginState.core;\r\n // Only update the plugin if it was initialized by the current core (i.e. It's not a shared plugin)\r\n if (plugin && (!pluginCore || pluginCore === updateCtx[strCore]()) && !pluginState[strTeardown]) {\r\n if (plugin[strUpdate] && plugin[strUpdate](updateCtx, updateState) === true) {\r\n // plugin told us that it was going to (or has) call unloadCtx.processNext()\r\n hasRun = true;\r\n }\r\n }\r\n }\r\n return hasRun;\r\n }\r\n if (!_processChain(updateCtx, _callUpdate, \"update\", function () { }, false)) {\r\n // Only called if we hasRun was not true\r\n updateCtx.processNext(updateState);\r\n }\r\n }\r\n return objFreeze(proxyChain);\r\n}\r\n/**\r\n * This class will be removed!\r\n * @deprecated use createProcessTelemetryContext() instead\r\n */\r\nvar ProcessTelemetryContext = /** @class */ (function () {\r\n /**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n */\r\n function ProcessTelemetryContext(pluginChain, config, core, startAt) {\r\n var _self = this;\r\n var context = createProcessTelemetryContext(pluginChain, config, core, startAt);\r\n // Proxy all functions of the context to this object\r\n proxyFunctions(_self, context, objKeys(context));\r\n }\r\n return ProcessTelemetryContext;\r\n}());\r\nexport { ProcessTelemetryContext };\r\n//# sourceMappingURL=ProcessTelemetryContext.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"ProcessTelemetryContext.js.map","sources":["ProcessTelemetryContext.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nimport { safeGetLogger } from \"./DiagnosticLogger\";\r\nimport { TelemetryPluginChain } from \"./TelemetryPluginChain\";\r\nimport { arrForEach, isFunction, isNullOrUndefined, isUndefined } from \"./HelperFuncs\";\r\n/**\r\n * Creates the instance execution chain for the plugins\r\n */\r\nfunction _createProxyChain(plugins, itemCtx) {\r\n var proxies = [];\r\n if (plugins && plugins.length > 0) {\r\n // Create the proxies and wire up the next plugin chain\r\n var lastProxy = null;\r\n for (var idx = 0; idx < plugins.length; idx++) {\r\n var thePlugin = plugins[idx];\r\n if (thePlugin && isFunction(thePlugin.processTelemetry)) {\r\n // Only add plugins that are processors\r\n var newProxy = new TelemetryPluginChain(thePlugin, itemCtx);\r\n proxies.push(newProxy);\r\n if (lastProxy) {\r\n // Set this new proxy as the next for the previous one\r\n lastProxy.setNext(newProxy);\r\n }\r\n lastProxy = newProxy;\r\n }\r\n }\r\n }\r\n return proxies.length > 0 ? proxies[0] : null;\r\n}\r\nfunction _copyProxyChain(proxy, itemCtx, startAt) {\r\n var plugins = [];\r\n var add = startAt ? false : true;\r\n if (proxy) {\r\n while (proxy) {\r\n var thePlugin = proxy.getPlugin();\r\n if (add || thePlugin === startAt) {\r\n add = true;\r\n plugins.push(thePlugin);\r\n }\r\n proxy = proxy.getNext();\r\n }\r\n }\r\n if (!add) {\r\n plugins.push(startAt);\r\n }\r\n return _createProxyChain(plugins, itemCtx);\r\n}\r\nfunction _copyPluginChain(srcPlugins, itemCtx, startAt) {\r\n var plugins = srcPlugins;\r\n var add = false;\r\n if (startAt && srcPlugins) {\r\n plugins = [];\r\n arrForEach(srcPlugins, function (thePlugin) {\r\n if (add || thePlugin === startAt) {\r\n add = true;\r\n plugins.push(thePlugin);\r\n }\r\n });\r\n }\r\n if (startAt && !add) {\r\n if (!plugins) {\r\n plugins = [];\r\n }\r\n plugins.push(startAt);\r\n }\r\n return _createProxyChain(plugins, itemCtx);\r\n}\r\nvar ProcessTelemetryContext = /** @class */ (function () {\r\n /**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n */\r\n function ProcessTelemetryContext(plugins, config, core, startAt) {\r\n var _self = this;\r\n var _nextProxy = null; // Null == No next plugin\r\n // There is no next element (null) vs not defined (undefined)\r\n if (startAt !== null) {\r\n if (plugins && isFunction(plugins.getPlugin)) {\r\n // We have a proxy chain object\r\n _nextProxy = _copyProxyChain(plugins, _self, startAt || plugins.getPlugin());\r\n }\r\n else {\r\n // We just have an array\r\n if (startAt) {\r\n _nextProxy = _copyPluginChain(plugins, _self, startAt);\r\n }\r\n else if (isUndefined(startAt)) {\r\n // Undefined means copy the existing chain\r\n _nextProxy = _createProxyChain(plugins, _self);\r\n }\r\n }\r\n }\r\n _self.core = function () {\r\n return core;\r\n };\r\n _self.diagLog = function () {\r\n return safeGetLogger(core, config);\r\n };\r\n _self.getCfg = function () {\r\n return config;\r\n };\r\n _self.getExtCfg = function (identifier, defaultValue) {\r\n if (defaultValue === void 0) { defaultValue = {}; }\r\n var theConfig;\r\n if (config) {\r\n var extConfig = config.extensionConfig;\r\n if (extConfig && identifier) {\r\n theConfig = extConfig[identifier];\r\n }\r\n }\r\n return (theConfig ? theConfig : defaultValue);\r\n };\r\n _self.getConfig = function (identifier, field, defaultValue) {\r\n if (defaultValue === void 0) { defaultValue = false; }\r\n var theValue;\r\n var extConfig = _self.getExtCfg(identifier, null);\r\n if (extConfig && !isNullOrUndefined(extConfig[field])) {\r\n theValue = extConfig[field];\r\n }\r\n else if (config && !isNullOrUndefined(config[field])) {\r\n theValue = config[field];\r\n }\r\n return !isNullOrUndefined(theValue) ? theValue : defaultValue;\r\n };\r\n _self.hasNext = function () {\r\n return _nextProxy != null;\r\n };\r\n _self.getNext = function () {\r\n return _nextProxy;\r\n };\r\n _self.setNext = function (nextPlugin) {\r\n _nextProxy = nextPlugin;\r\n };\r\n _self.processNext = function (env) {\r\n var nextPlugin = _nextProxy;\r\n if (nextPlugin) {\r\n // Automatically move to the next plugin\r\n _nextProxy = nextPlugin.getNext();\r\n nextPlugin.processTelemetry(env, _self);\r\n }\r\n };\r\n _self.createNew = function (plugins, startAt) {\r\n if (plugins === void 0) { plugins = null; }\r\n return new ProcessTelemetryContext(plugins || _nextProxy, config, core, startAt);\r\n };\r\n }\r\n return ProcessTelemetryContext;\r\n}());\r\nexport { ProcessTelemetryContext };\r\n//# sourceMappingURL=ProcessTelemetryContext.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,12 +1,11 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 2.7.5-nightly.2203-03
2
+ * Application Insights JavaScript SDK - Core, 2.7.5
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
7
  import { getCrypto, getMsCrypto, isIE } from "./EnvUtils";
8
8
  import { dateNow } from "./HelperFuncs";
9
- import { strEmpty } from "./InternalConstants";
10
9
  var UInt32Mask = 0x100000000;
11
10
  var MaxUInt32 = 0xffffffff;
12
11
  // MWC based Random generator (for IE)
@@ -50,13 +49,13 @@ export function randomValue(maxValue) {
50
49
  * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)
51
50
  */
52
51
  export function random32(signed) {
53
- var value = 0;
52
+ var value;
54
53
  var c = getCrypto() || getMsCrypto();
55
54
  if (c && c.getRandomValues) {
56
55
  // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)
57
56
  value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
58
57
  }
59
- if (value === 0 && isIE()) {
58
+ else if (isIE()) {
60
59
  // For IE 6, 7, 8 (especially on XP) Math.random is not very random
61
60
  if (!_mwcSeeded) {
62
61
  // Set the seed for the Mwc algorithm
@@ -66,7 +65,7 @@ export function random32(signed) {
66
65
  // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)
67
66
  value = mwcRandom32() & MaxUInt32;
68
67
  }
69
- if (value === 0) {
68
+ else {
70
69
  // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)
71
70
  value = Math.floor((UInt32Mask * Math.random()) | 0);
72
71
  }
@@ -104,29 +103,4 @@ export function mwcRandom32(signed) {
104
103
  }
105
104
  return value;
106
105
  }
107
- /**
108
- * Generate random base64 id string.
109
- * The default length is 22 which is 132-bits so almost the same as a GUID but as base64 (the previous default was 5)
110
- * @param maxLength - Optional value to specify the length of the id to be generated, defaults to 22
111
- */
112
- export function newId(maxLength) {
113
- if (maxLength === void 0) { maxLength = 22; }
114
- var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
115
- // Start with an initial random number, consuming the value in reverse byte order
116
- var number = random32() >>> 0; // Make sure it's a +ve number
117
- var chars = 0;
118
- var result = strEmpty;
119
- while (result.length < maxLength) {
120
- chars++;
121
- result += base64chars.charAt(number & 0x3F);
122
- number >>>= 6; // Zero fill with right shift
123
- if (chars === 5) {
124
- // 5 base64 characters === 30 bits so we don't have enough bits for another base64 char
125
- // So add on another 30 bits and make sure it's +ve
126
- number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
127
- chars = 0; // We need to reset the number every 5 chars (30 bits)
128
- }
129
- }
130
- return result;
131
- }
132
106
  //# sourceMappingURL=RandomHelper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RandomHelper.js.map","sources":["RandomHelper.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { getCrypto, getMsCrypto, isIE } from \"./EnvUtils\";\r\nimport { dateNow } from \"./HelperFuncs\";\r\nimport { strEmpty } from \"./InternalConstants\";\r\nvar UInt32Mask = 0x100000000;\r\nvar MaxUInt32 = 0xffffffff;\r\n// MWC based Random generator (for IE)\r\nvar _mwcSeeded = false;\r\nvar _mwcW = 123456789;\r\nvar _mwcZ = 987654321;\r\n// Takes any integer\r\nfunction _mwcSeed(seedValue) {\r\n if (seedValue < 0) {\r\n // Make sure we end up with a positive number and not -ve one.\r\n seedValue >>>= 0;\r\n }\r\n _mwcW = (123456789 + seedValue) & MaxUInt32;\r\n _mwcZ = (987654321 - seedValue) & MaxUInt32;\r\n _mwcSeeded = true;\r\n}\r\nfunction _autoSeedMwc() {\r\n // Simple initialization using default Math.random() - So we inherit any entropy from the browser\r\n // and bitwise XOR with the current milliseconds\r\n try {\r\n var now = dateNow() & 0x7fffffff;\r\n _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);\r\n }\r\n catch (e) {\r\n // Don't crash if something goes wrong\r\n }\r\n}\r\n/**\r\n * Generate a random value between 0 and maxValue, max value should be limited to a 32-bit maximum.\r\n * So maxValue(16) will produce a number from 0..16 (range of 17)\r\n * @param maxValue\r\n */\r\nexport function randomValue(maxValue) {\r\n if (maxValue > 0) {\r\n return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;\r\n }\r\n return 0;\r\n}\r\n/**\r\n * generate a random 32-bit number (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), defaults un-unsigned.\r\n * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)\r\n */\r\nexport function random32(signed) {\r\n var value = 0;\r\n var c = getCrypto() || getMsCrypto();\r\n if (c && c.getRandomValues) {\r\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\r\n value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;\r\n }\r\n if (value === 0 && isIE()) {\r\n // For IE 6, 7, 8 (especially on XP) Math.random is not very random\r\n if (!_mwcSeeded) {\r\n // Set the seed for the Mwc algorithm\r\n _autoSeedMwc();\r\n }\r\n // Don't use Math.random for IE\r\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\r\n value = mwcRandom32() & MaxUInt32;\r\n }\r\n if (value === 0) {\r\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\r\n value = Math.floor((UInt32Mask * Math.random()) | 0);\r\n }\r\n if (!signed) {\r\n // Make sure we end up with a positive number and not -ve one.\r\n value >>>= 0;\r\n }\r\n return value;\r\n}\r\n/**\r\n * Seed the MWC random number generator with the specified seed or a random value\r\n * @param value - optional the number to used as the seed, if undefined, null or zero a random value will be chosen\r\n */\r\nexport function mwcRandomSeed(value) {\r\n if (!value) {\r\n _autoSeedMwc();\r\n }\r\n else {\r\n _mwcSeed(value);\r\n }\r\n}\r\n/**\r\n * Generate a random 32-bit number between (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), using MWC (Multiply with carry)\r\n * instead of Math.random() defaults to un-signed.\r\n * Used as a replacement random generator for IE to avoid issues with older IE instances.\r\n * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)\r\n */\r\nexport function mwcRandom32(signed) {\r\n _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;\r\n _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;\r\n var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;\r\n if (!signed) {\r\n // Make sure we end up with a positive number and not -ve one.\r\n value >>>= 0;\r\n }\r\n return value;\r\n}\r\n/**\r\n * Generate random base64 id string.\r\n * The default length is 22 which is 132-bits so almost the same as a GUID but as base64 (the previous default was 5)\r\n * @param maxLength - Optional value to specify the length of the id to be generated, defaults to 22\r\n */\r\nexport function newId(maxLength) {\r\n if (maxLength === void 0) { maxLength = 22; }\r\n var base64chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\r\n // Start with an initial random number, consuming the value in reverse byte order\r\n var number = random32() >>> 0; // Make sure it's a +ve number\r\n var chars = 0;\r\n var result = strEmpty;\r\n while (result.length < maxLength) {\r\n chars++;\r\n result += base64chars.charAt(number & 0x3F);\r\n number >>>= 6; // Zero fill with right shift\r\n if (chars === 5) {\r\n // 5 base64 characters === 30 bits so we don't have enough bits for another base64 char\r\n // So add on another 30 bits and make sure it's +ve\r\n number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;\r\n chars = 0; // We need to reset the number every 5 chars (30 bits)\r\n }\r\n }\r\n return result;\r\n}\r\n//# sourceMappingURL=RandomHelper.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"RandomHelper.js.map","sources":["RandomHelper.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { getCrypto, getMsCrypto, isIE } from \"./EnvUtils\";\r\nimport { dateNow } from \"./HelperFuncs\";\r\nvar UInt32Mask = 0x100000000;\r\nvar MaxUInt32 = 0xffffffff;\r\n// MWC based Random generator (for IE)\r\nvar _mwcSeeded = false;\r\nvar _mwcW = 123456789;\r\nvar _mwcZ = 987654321;\r\n// Takes any integer\r\nfunction _mwcSeed(seedValue) {\r\n if (seedValue < 0) {\r\n // Make sure we end up with a positive number and not -ve one.\r\n seedValue >>>= 0;\r\n }\r\n _mwcW = (123456789 + seedValue) & MaxUInt32;\r\n _mwcZ = (987654321 - seedValue) & MaxUInt32;\r\n _mwcSeeded = true;\r\n}\r\nfunction _autoSeedMwc() {\r\n // Simple initialization using default Math.random() - So we inherit any entropy from the browser\r\n // and bitwise XOR with the current milliseconds\r\n try {\r\n var now = dateNow() & 0x7fffffff;\r\n _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);\r\n }\r\n catch (e) {\r\n // Don't crash if something goes wrong\r\n }\r\n}\r\n/**\r\n * Generate a random value between 0 and maxValue, max value should be limited to a 32-bit maximum.\r\n * So maxValue(16) will produce a number from 0..16 (range of 17)\r\n * @param maxValue\r\n */\r\nexport function randomValue(maxValue) {\r\n if (maxValue > 0) {\r\n return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;\r\n }\r\n return 0;\r\n}\r\n/**\r\n * generate a random 32-bit number (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), defaults un-unsigned.\r\n * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)\r\n */\r\nexport function random32(signed) {\r\n var value;\r\n var c = getCrypto() || getMsCrypto();\r\n if (c && c.getRandomValues) {\r\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\r\n value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;\r\n }\r\n else if (isIE()) {\r\n // For IE 6, 7, 8 (especially on XP) Math.random is not very random\r\n if (!_mwcSeeded) {\r\n // Set the seed for the Mwc algorithm\r\n _autoSeedMwc();\r\n }\r\n // Don't use Math.random for IE\r\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\r\n value = mwcRandom32() & MaxUInt32;\r\n }\r\n else {\r\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\r\n value = Math.floor((UInt32Mask * Math.random()) | 0);\r\n }\r\n if (!signed) {\r\n // Make sure we end up with a positive number and not -ve one.\r\n value >>>= 0;\r\n }\r\n return value;\r\n}\r\n/**\r\n * Seed the MWC random number generator with the specified seed or a random value\r\n * @param value - optional the number to used as the seed, if undefined, null or zero a random value will be chosen\r\n */\r\nexport function mwcRandomSeed(value) {\r\n if (!value) {\r\n _autoSeedMwc();\r\n }\r\n else {\r\n _mwcSeed(value);\r\n }\r\n}\r\n/**\r\n * Generate a random 32-bit number between (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), using MWC (Multiply with carry)\r\n * instead of Math.random() defaults to un-signed.\r\n * Used as a replacement random generator for IE to avoid issues with older IE instances.\r\n * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)\r\n */\r\nexport function mwcRandom32(signed) {\r\n _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;\r\n _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;\r\n var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;\r\n if (!signed) {\r\n // Make sure we end up with a positive number and not -ve one.\r\n value >>>= 0;\r\n }\r\n return value;\r\n}\r\n//# sourceMappingURL=RandomHelper.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,18 +1,15 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 2.7.5-nightly.2203-03
2
+ * Application Insights JavaScript SDK - Core, 2.7.5
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
7
  "use strict";
8
8
  import { arrForEach, isFunction } from "./HelperFuncs";
9
- import { strCore, strDoTeardown, strIsInitialized, strPriority, strProcessTelemetry, strSetNextPlugin, strTeardown } from "./InternalConstants";
10
- import { createElmNodeData } from "./DataCacheHelper";
11
- var strDoUnload = "_doUnload";
12
- var pluginStateData = createElmNodeData("plugin");
13
- export function _getPluginState(plugin) {
14
- return pluginStateData.get(plugin, "state", {}, true);
15
- }
9
+ var processTelemetry = "processTelemetry";
10
+ var priority = "priority";
11
+ var setNextPlugin = "setNextPlugin";
12
+ var isInitialized = "isInitialized";
16
13
  /**
17
14
  * Initialize the queue of plugins
18
15
  * @param plugins - The array of plugins to initialize and setting of the next plugin
@@ -25,51 +22,34 @@ export function initializePlugins(processContext, extensions) {
25
22
  var initPlugins = [];
26
23
  var lastPlugin = null;
27
24
  var proxy = processContext.getNext();
28
- var pluginState;
29
25
  while (proxy) {
30
26
  var thePlugin = proxy.getPlugin();
31
27
  if (thePlugin) {
32
28
  if (lastPlugin &&
33
- isFunction(lastPlugin[strSetNextPlugin]) &&
34
- isFunction(thePlugin[strProcessTelemetry])) {
29
+ isFunction(lastPlugin[setNextPlugin]) &&
30
+ isFunction(thePlugin[processTelemetry])) {
35
31
  // Set this plugin as the next for the previous one
36
- lastPlugin[strSetNextPlugin](thePlugin);
37
- }
38
- var isInitialized = false;
39
- if (isFunction(thePlugin[strIsInitialized])) {
40
- isInitialized = thePlugin[strIsInitialized]();
41
- }
42
- else {
43
- pluginState = _getPluginState(thePlugin);
44
- isInitialized = pluginState[strIsInitialized];
32
+ lastPlugin[setNextPlugin](thePlugin);
45
33
  }
46
- if (!isInitialized) {
34
+ if (!isFunction(thePlugin[isInitialized]) || !thePlugin[isInitialized]()) {
47
35
  initPlugins.push(thePlugin);
48
36
  }
49
37
  lastPlugin = thePlugin;
50
38
  proxy = proxy.getNext();
51
39
  }
52
40
  }
53
- // Now initialize the plugins
41
+ // Now initiatilize the plugins
54
42
  arrForEach(initPlugins, function (thePlugin) {
55
- var core = processContext.core();
56
- thePlugin.initialize(processContext.getCfg(), core, extensions, processContext.getNext());
57
- pluginState = _getPluginState(thePlugin);
58
- // Only add the core to the state if the plugin didn't set it (doesn't extent from BaseTelemetryPlugin)
59
- if (!thePlugin[strCore] && !pluginState[strCore]) {
60
- pluginState[strCore] = core;
61
- }
62
- pluginState[strIsInitialized] = true;
63
- delete pluginState[strTeardown];
43
+ thePlugin.initialize(processContext.getCfg(), processContext.core(), extensions, processContext.getNext());
64
44
  });
65
45
  }
66
46
  export function sortPlugins(plugins) {
67
47
  // Sort by priority
68
48
  return plugins.sort(function (extA, extB) {
69
49
  var result = 0;
70
- var bHasProcess = isFunction(extB[strProcessTelemetry]);
71
- if (isFunction(extA[strProcessTelemetry])) {
72
- result = bHasProcess ? extA[strPriority] - extB[strPriority] : 1;
50
+ var bHasProcess = isFunction(extB[processTelemetry]);
51
+ if (isFunction(extA[processTelemetry])) {
52
+ result = bHasProcess ? extA[priority] - extB[priority] : 1;
73
53
  }
74
54
  else if (bHasProcess) {
75
55
  result = -1;
@@ -78,30 +58,4 @@ export function sortPlugins(plugins) {
78
58
  });
79
59
  // sort complete
80
60
  }
81
- /**
82
- * Teardown / Unload helper to perform teardown/unloading operations for the provided components synchronously or asynchronously, this will call any
83
- * _doTeardown() or _doUnload() functions on the provided components to allow them to finish removal.
84
- * @param components - The components you want to unload
85
- * @param unloadCtx - This is the context that should be used during unloading.
86
- * @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.
87
- * @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.
88
- * @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
89
- */
90
- export function unloadComponents(components, unloadCtx, unloadState, asyncCallback) {
91
- var idx = 0;
92
- function _doUnload() {
93
- while (idx < components.length) {
94
- var component = components[idx++];
95
- if (component) {
96
- var func = component[strDoUnload] || component[strDoTeardown];
97
- if (isFunction(func)) {
98
- if (func.call(component, unloadCtx, unloadState, _doUnload) === true) {
99
- return true;
100
- }
101
- }
102
- }
103
- }
104
- }
105
- return _doUnload();
106
- }
107
61
  //# sourceMappingURL=TelemetryHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TelemetryHelpers.js.map","sources":["TelemetryHelpers.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nimport { arrForEach, isFunction } from \"./HelperFuncs\";\r\nimport { strCore, strDoTeardown, strIsInitialized, strPriority, strProcessTelemetry, strSetNextPlugin, strTeardown } from \"./InternalConstants\";\r\nimport { createElmNodeData } from \"./DataCacheHelper\";\r\nvar strDoUnload = \"_doUnload\";\r\nvar pluginStateData = createElmNodeData(\"plugin\");\r\nexport function _getPluginState(plugin) {\r\n return pluginStateData.get(plugin, \"state\", {}, true);\r\n}\r\n/**\r\n * Initialize the queue of plugins\r\n * @param plugins - The array of plugins to initialize and setting of the next plugin\r\n * @param config The current config for the instance\r\n * @param core THe current core instance\r\n * @param extensions The extensions\r\n */\r\nexport function initializePlugins(processContext, extensions) {\r\n // Set the next plugin and identified the uninitialized plugins\r\n var initPlugins = [];\r\n var lastPlugin = null;\r\n var proxy = processContext.getNext();\r\n var pluginState;\r\n while (proxy) {\r\n var thePlugin = proxy.getPlugin();\r\n if (thePlugin) {\r\n if (lastPlugin &&\r\n isFunction(lastPlugin[strSetNextPlugin]) &&\r\n isFunction(thePlugin[strProcessTelemetry])) {\r\n // Set this plugin as the next for the previous one\r\n lastPlugin[strSetNextPlugin](thePlugin);\r\n }\r\n var isInitialized = false;\r\n if (isFunction(thePlugin[strIsInitialized])) {\r\n isInitialized = thePlugin[strIsInitialized]();\r\n }\r\n else {\r\n pluginState = _getPluginState(thePlugin);\r\n isInitialized = pluginState[strIsInitialized];\r\n }\r\n if (!isInitialized) {\r\n initPlugins.push(thePlugin);\r\n }\r\n lastPlugin = thePlugin;\r\n proxy = proxy.getNext();\r\n }\r\n }\r\n // Now initialize the plugins\r\n arrForEach(initPlugins, function (thePlugin) {\r\n var core = processContext.core();\r\n thePlugin.initialize(processContext.getCfg(), core, extensions, processContext.getNext());\r\n pluginState = _getPluginState(thePlugin);\r\n // Only add the core to the state if the plugin didn't set it (doesn't extent from BaseTelemetryPlugin)\r\n if (!thePlugin[strCore] && !pluginState[strCore]) {\r\n pluginState[strCore] = core;\r\n }\r\n pluginState[strIsInitialized] = true;\r\n delete pluginState[strTeardown];\r\n });\r\n}\r\nexport function sortPlugins(plugins) {\r\n // Sort by priority\r\n return plugins.sort(function (extA, extB) {\r\n var result = 0;\r\n var bHasProcess = isFunction(extB[strProcessTelemetry]);\r\n if (isFunction(extA[strProcessTelemetry])) {\r\n result = bHasProcess ? extA[strPriority] - extB[strPriority] : 1;\r\n }\r\n else if (bHasProcess) {\r\n result = -1;\r\n }\r\n return result;\r\n });\r\n // sort complete\r\n}\r\n/**\r\n * Teardown / Unload helper to perform teardown/unloading operations for the provided components synchronously or asynchronously, this will call any\r\n * _doTeardown() or _doUnload() functions on the provided components to allow them to finish removal.\r\n * @param components - The components you want to unload\r\n * @param unloadCtx - This is the context that should be used during unloading.\r\n * @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.\r\n * @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.\r\n * @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.\r\n */\r\nexport function unloadComponents(components, unloadCtx, unloadState, asyncCallback) {\r\n var idx = 0;\r\n function _doUnload() {\r\n while (idx < components.length) {\r\n var component = components[idx++];\r\n if (component) {\r\n var func = component[strDoUnload] || component[strDoTeardown];\r\n if (isFunction(func)) {\r\n if (func.call(component, unloadCtx, unloadState, _doUnload) === true) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return _doUnload();\r\n}\r\n//# sourceMappingURL=TelemetryHelpers.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"TelemetryHelpers.js.map","sources":["TelemetryHelpers.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nimport { arrForEach, isFunction } from \"./HelperFuncs\";\r\nvar processTelemetry = \"processTelemetry\";\r\nvar priority = \"priority\";\r\nvar setNextPlugin = \"setNextPlugin\";\r\nvar isInitialized = \"isInitialized\";\r\n/**\r\n * Initialize the queue of plugins\r\n * @param plugins - The array of plugins to initialize and setting of the next plugin\r\n * @param config The current config for the instance\r\n * @param core THe current core instance\r\n * @param extensions The extensions\r\n */\r\nexport function initializePlugins(processContext, extensions) {\r\n // Set the next plugin and identified the uninitialized plugins\r\n var initPlugins = [];\r\n var lastPlugin = null;\r\n var proxy = processContext.getNext();\r\n while (proxy) {\r\n var thePlugin = proxy.getPlugin();\r\n if (thePlugin) {\r\n if (lastPlugin &&\r\n isFunction(lastPlugin[setNextPlugin]) &&\r\n isFunction(thePlugin[processTelemetry])) {\r\n // Set this plugin as the next for the previous one\r\n lastPlugin[setNextPlugin](thePlugin);\r\n }\r\n if (!isFunction(thePlugin[isInitialized]) || !thePlugin[isInitialized]()) {\r\n initPlugins.push(thePlugin);\r\n }\r\n lastPlugin = thePlugin;\r\n proxy = proxy.getNext();\r\n }\r\n }\r\n // Now initiatilize the plugins\r\n arrForEach(initPlugins, function (thePlugin) {\r\n thePlugin.initialize(processContext.getCfg(), processContext.core(), extensions, processContext.getNext());\r\n });\r\n}\r\nexport function sortPlugins(plugins) {\r\n // Sort by priority\r\n return plugins.sort(function (extA, extB) {\r\n var result = 0;\r\n var bHasProcess = isFunction(extB[processTelemetry]);\r\n if (isFunction(extA[processTelemetry])) {\r\n result = bHasProcess ? extA[priority] - extB[priority] : 1;\r\n }\r\n else if (bHasProcess) {\r\n result = -1;\r\n }\r\n return result;\r\n });\r\n // sort complete\r\n}\r\n//# sourceMappingURL=TelemetryHelpers.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -0,0 +1,76 @@
1
+ /*
2
+ * Application Insights JavaScript SDK - Core, 2.7.5
3
+ * Copyright (c) Microsoft and contributors. All rights reserved.
4
+ */
5
+
6
+
7
+ "use strict";
8
+ import { doPerf } from "./PerfManager";
9
+ import { LoggingSeverity, _InternalMessageId } from "../JavaScriptSDK.Enums/LoggingEnums";
10
+ import { isFunction } from "./HelperFuncs";
11
+ import { dumpObj } from "./EnvUtils";
12
+ var TelemetryPluginChain = /** @class */ (function () {
13
+ function TelemetryPluginChain(plugin, defItemCtx) {
14
+ var _self = this;
15
+ var _nextProxy = null;
16
+ var _hasProcessTelemetry = isFunction(plugin.processTelemetry);
17
+ var _hasSetNext = isFunction(plugin.setNextPlugin);
18
+ _self._hasRun = false;
19
+ _self.getPlugin = function () {
20
+ return plugin;
21
+ };
22
+ _self.getNext = function () {
23
+ return _nextProxy;
24
+ };
25
+ _self.setNext = function (nextPlugin) {
26
+ _nextProxy = nextPlugin;
27
+ };
28
+ _self.processTelemetry = function (env, itemCtx) {
29
+ if (!itemCtx) {
30
+ // Looks like a plugin didn't pass the (optional) context, so restore to the default
31
+ itemCtx = defItemCtx;
32
+ }
33
+ var identifier = plugin ? plugin.identifier : "TelemetryPluginChain";
34
+ doPerf(itemCtx ? itemCtx.core() : null, function () { return identifier + ":processTelemetry"; }, function () {
35
+ if (plugin && _hasProcessTelemetry) {
36
+ _self._hasRun = true;
37
+ try {
38
+ // Ensure that we keep the context in sync (for processNext()), just in case a plugin
39
+ // doesn't calls processTelemetry() instead of itemContext.processNext() or some
40
+ // other form of error occurred
41
+ itemCtx.setNext(_nextProxy);
42
+ if (_hasSetNext) {
43
+ // Backward compatibility setting the next plugin on the instance
44
+ plugin.setNextPlugin(_nextProxy);
45
+ }
46
+ // Set a flag on the next plugin so we know if it was attempted to be executed
47
+ _nextProxy && (_nextProxy._hasRun = false);
48
+ plugin.processTelemetry(env, itemCtx);
49
+ }
50
+ catch (error) {
51
+ var hasRun = _nextProxy && _nextProxy._hasRun;
52
+ if (!_nextProxy || !hasRun) {
53
+ // Either we have no next plugin or the current one did not attempt to call the next plugin
54
+ // Which means the current one is the root of the failure so log/report this failure
55
+ itemCtx.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.PluginException, "Plugin [" + plugin.identifier + "] failed during processTelemetry - " + dumpObj(error));
56
+ }
57
+ if (_nextProxy && !hasRun) {
58
+ // As part of the failure the current plugin did not attempt to call the next plugin in the cahin
59
+ // So rather than leave the pipeline dead in the water we call the next plugin
60
+ _nextProxy.processTelemetry(env, itemCtx);
61
+ }
62
+ }
63
+ }
64
+ else if (_nextProxy) {
65
+ _self._hasRun = true;
66
+ // The underlying plugin is either not defined or does not have a processTelemetry implementation
67
+ // so we still want the next plugin to be executed.
68
+ _nextProxy.processTelemetry(env, itemCtx);
69
+ }
70
+ }, function () { return ({ item: env }); }, !(env.sync));
71
+ };
72
+ }
73
+ return TelemetryPluginChain;
74
+ }());
75
+ export { TelemetryPluginChain };
76
+ //# sourceMappingURL=TelemetryPluginChain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TelemetryPluginChain.js.map","sources":["TelemetryPluginChain.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\"use strict\";\r\nimport { doPerf } from \"./PerfManager\";\r\nimport { LoggingSeverity, _InternalMessageId } from \"../JavaScriptSDK.Enums/LoggingEnums\";\r\nimport { isFunction } from \"./HelperFuncs\";\r\nimport { dumpObj } from \"./EnvUtils\";\r\nvar TelemetryPluginChain = /** @class */ (function () {\r\n function TelemetryPluginChain(plugin, defItemCtx) {\r\n var _self = this;\r\n var _nextProxy = null;\r\n var _hasProcessTelemetry = isFunction(plugin.processTelemetry);\r\n var _hasSetNext = isFunction(plugin.setNextPlugin);\r\n _self._hasRun = false;\r\n _self.getPlugin = function () {\r\n return plugin;\r\n };\r\n _self.getNext = function () {\r\n return _nextProxy;\r\n };\r\n _self.setNext = function (nextPlugin) {\r\n _nextProxy = nextPlugin;\r\n };\r\n _self.processTelemetry = function (env, itemCtx) {\r\n if (!itemCtx) {\r\n // Looks like a plugin didn't pass the (optional) context, so restore to the default\r\n itemCtx = defItemCtx;\r\n }\r\n var identifier = plugin ? plugin.identifier : \"TelemetryPluginChain\";\r\n doPerf(itemCtx ? itemCtx.core() : null, function () { return identifier + \":processTelemetry\"; }, function () {\r\n if (plugin && _hasProcessTelemetry) {\r\n _self._hasRun = true;\r\n try {\r\n // Ensure that we keep the context in sync (for processNext()), just in case a plugin\r\n // doesn't calls processTelemetry() instead of itemContext.processNext() or some\r\n // other form of error occurred\r\n itemCtx.setNext(_nextProxy);\r\n if (_hasSetNext) {\r\n // Backward compatibility setting the next plugin on the instance\r\n plugin.setNextPlugin(_nextProxy);\r\n }\r\n // Set a flag on the next plugin so we know if it was attempted to be executed\r\n _nextProxy && (_nextProxy._hasRun = false);\r\n plugin.processTelemetry(env, itemCtx);\r\n }\r\n catch (error) {\r\n var hasRun = _nextProxy && _nextProxy._hasRun;\r\n if (!_nextProxy || !hasRun) {\r\n // Either we have no next plugin or the current one did not attempt to call the next plugin\r\n // Which means the current one is the root of the failure so log/report this failure\r\n itemCtx.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.PluginException, \"Plugin [\" + plugin.identifier + \"] failed during processTelemetry - \" + dumpObj(error));\r\n }\r\n if (_nextProxy && !hasRun) {\r\n // As part of the failure the current plugin did not attempt to call the next plugin in the cahin\r\n // So rather than leave the pipeline dead in the water we call the next plugin\r\n _nextProxy.processTelemetry(env, itemCtx);\r\n }\r\n }\r\n }\r\n else if (_nextProxy) {\r\n _self._hasRun = true;\r\n // The underlying plugin is either not defined or does not have a processTelemetry implementation\r\n // so we still want the next plugin to be executed.\r\n _nextProxy.processTelemetry(env, itemCtx);\r\n }\r\n }, function () { return ({ item: env }); }, !(env.sync));\r\n };\r\n }\r\n return TelemetryPluginChain;\r\n}());\r\nexport { TelemetryPluginChain };\r\n//# sourceMappingURL=TelemetryPluginChain.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 2.7.5-nightly.2203-03
2
+ * Application Insights JavaScript SDK - Core, 2.7.5
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,101 +1,107 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 2.7.5-nightly.2203-03
2
+ * Application Insights JavaScript SDK - Core, 2.7.5
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
- import { createEnumStyle } from "../JavaScriptSDK/HelperFuncs";
8
- export var LoggingSeverity = createEnumStyle({
9
- CRITICAL: 1 /* CRITICAL */,
10
- WARNING: 2 /* WARNING */
11
- });
7
+ export var LoggingSeverity;
8
+ (function (LoggingSeverity) {
9
+ /**
10
+ * Error will be sent as internal telemetry
11
+ */
12
+ LoggingSeverity[LoggingSeverity["CRITICAL"] = 1] = "CRITICAL";
13
+ /**
14
+ * Error will NOT be sent as internal telemetry, and will only be shown in browser console
15
+ */
16
+ LoggingSeverity[LoggingSeverity["WARNING"] = 2] = "WARNING";
17
+ })(LoggingSeverity || (LoggingSeverity = {}));
12
18
  /**
13
19
  * Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered
14
20
  */
15
- export var _InternalMessageId = createEnumStyle({
21
+ export var _InternalMessageId = {
16
22
  // Non user actionable
17
- BrowserDoesNotSupportLocalStorage: 0 /* BrowserDoesNotSupportLocalStorage */,
18
- BrowserCannotReadLocalStorage: 1 /* BrowserCannotReadLocalStorage */,
19
- BrowserCannotReadSessionStorage: 2 /* BrowserCannotReadSessionStorage */,
20
- BrowserCannotWriteLocalStorage: 3 /* BrowserCannotWriteLocalStorage */,
21
- BrowserCannotWriteSessionStorage: 4 /* BrowserCannotWriteSessionStorage */,
22
- BrowserFailedRemovalFromLocalStorage: 5 /* BrowserFailedRemovalFromLocalStorage */,
23
- BrowserFailedRemovalFromSessionStorage: 6 /* BrowserFailedRemovalFromSessionStorage */,
24
- CannotSendEmptyTelemetry: 7 /* CannotSendEmptyTelemetry */,
25
- ClientPerformanceMathError: 8 /* ClientPerformanceMathError */,
26
- ErrorParsingAISessionCookie: 9 /* ErrorParsingAISessionCookie */,
27
- ErrorPVCalc: 10 /* ErrorPVCalc */,
28
- ExceptionWhileLoggingError: 11 /* ExceptionWhileLoggingError */,
29
- FailedAddingTelemetryToBuffer: 12 /* FailedAddingTelemetryToBuffer */,
30
- FailedMonitorAjaxAbort: 13 /* FailedMonitorAjaxAbort */,
31
- FailedMonitorAjaxDur: 14 /* FailedMonitorAjaxDur */,
32
- FailedMonitorAjaxOpen: 15 /* FailedMonitorAjaxOpen */,
33
- FailedMonitorAjaxRSC: 16 /* FailedMonitorAjaxRSC */,
34
- FailedMonitorAjaxSend: 17 /* FailedMonitorAjaxSend */,
35
- FailedMonitorAjaxGetCorrelationHeader: 18 /* FailedMonitorAjaxGetCorrelationHeader */,
36
- FailedToAddHandlerForOnBeforeUnload: 19 /* FailedToAddHandlerForOnBeforeUnload */,
37
- FailedToSendQueuedTelemetry: 20 /* FailedToSendQueuedTelemetry */,
38
- FailedToReportDataLoss: 21 /* FailedToReportDataLoss */,
39
- FlushFailed: 22 /* FlushFailed */,
40
- MessageLimitPerPVExceeded: 23 /* MessageLimitPerPVExceeded */,
41
- MissingRequiredFieldSpecification: 24 /* MissingRequiredFieldSpecification */,
42
- NavigationTimingNotSupported: 25 /* NavigationTimingNotSupported */,
43
- OnError: 26 /* OnError */,
44
- SessionRenewalDateIsZero: 27 /* SessionRenewalDateIsZero */,
45
- SenderNotInitialized: 28 /* SenderNotInitialized */,
46
- StartTrackEventFailed: 29 /* StartTrackEventFailed */,
47
- StopTrackEventFailed: 30 /* StopTrackEventFailed */,
48
- StartTrackFailed: 31 /* StartTrackFailed */,
49
- StopTrackFailed: 32 /* StopTrackFailed */,
50
- TelemetrySampledAndNotSent: 33 /* TelemetrySampledAndNotSent */,
51
- TrackEventFailed: 34 /* TrackEventFailed */,
52
- TrackExceptionFailed: 35 /* TrackExceptionFailed */,
53
- TrackMetricFailed: 36 /* TrackMetricFailed */,
54
- TrackPVFailed: 37 /* TrackPVFailed */,
55
- TrackPVFailedCalc: 38 /* TrackPVFailedCalc */,
56
- TrackTraceFailed: 39 /* TrackTraceFailed */,
57
- TransmissionFailed: 40 /* TransmissionFailed */,
58
- FailedToSetStorageBuffer: 41 /* FailedToSetStorageBuffer */,
59
- FailedToRestoreStorageBuffer: 42 /* FailedToRestoreStorageBuffer */,
60
- InvalidBackendResponse: 43 /* InvalidBackendResponse */,
61
- FailedToFixDepricatedValues: 44 /* FailedToFixDepricatedValues */,
62
- InvalidDurationValue: 45 /* InvalidDurationValue */,
63
- TelemetryEnvelopeInvalid: 46 /* TelemetryEnvelopeInvalid */,
64
- CreateEnvelopeError: 47 /* CreateEnvelopeError */,
23
+ BrowserDoesNotSupportLocalStorage: 0,
24
+ BrowserCannotReadLocalStorage: 1,
25
+ BrowserCannotReadSessionStorage: 2,
26
+ BrowserCannotWriteLocalStorage: 3,
27
+ BrowserCannotWriteSessionStorage: 4,
28
+ BrowserFailedRemovalFromLocalStorage: 5,
29
+ BrowserFailedRemovalFromSessionStorage: 6,
30
+ CannotSendEmptyTelemetry: 7,
31
+ ClientPerformanceMathError: 8,
32
+ ErrorParsingAISessionCookie: 9,
33
+ ErrorPVCalc: 10,
34
+ ExceptionWhileLoggingError: 11,
35
+ FailedAddingTelemetryToBuffer: 12,
36
+ FailedMonitorAjaxAbort: 13,
37
+ FailedMonitorAjaxDur: 14,
38
+ FailedMonitorAjaxOpen: 15,
39
+ FailedMonitorAjaxRSC: 16,
40
+ FailedMonitorAjaxSend: 17,
41
+ FailedMonitorAjaxGetCorrelationHeader: 18,
42
+ FailedToAddHandlerForOnBeforeUnload: 19,
43
+ FailedToSendQueuedTelemetry: 20,
44
+ FailedToReportDataLoss: 21,
45
+ FlushFailed: 22,
46
+ MessageLimitPerPVExceeded: 23,
47
+ MissingRequiredFieldSpecification: 24,
48
+ NavigationTimingNotSupported: 25,
49
+ OnError: 26,
50
+ SessionRenewalDateIsZero: 27,
51
+ SenderNotInitialized: 28,
52
+ StartTrackEventFailed: 29,
53
+ StopTrackEventFailed: 30,
54
+ StartTrackFailed: 31,
55
+ StopTrackFailed: 32,
56
+ TelemetrySampledAndNotSent: 33,
57
+ TrackEventFailed: 34,
58
+ TrackExceptionFailed: 35,
59
+ TrackMetricFailed: 36,
60
+ TrackPVFailed: 37,
61
+ TrackPVFailedCalc: 38,
62
+ TrackTraceFailed: 39,
63
+ TransmissionFailed: 40,
64
+ FailedToSetStorageBuffer: 41,
65
+ FailedToRestoreStorageBuffer: 42,
66
+ InvalidBackendResponse: 43,
67
+ FailedToFixDepricatedValues: 44,
68
+ InvalidDurationValue: 45,
69
+ TelemetryEnvelopeInvalid: 46,
70
+ CreateEnvelopeError: 47,
65
71
  // User actionable
66
- CannotSerializeObject: 48 /* CannotSerializeObject */,
67
- CannotSerializeObjectNonSerializable: 49 /* CannotSerializeObjectNonSerializable */,
68
- CircularReferenceDetected: 50 /* CircularReferenceDetected */,
69
- ClearAuthContextFailed: 51 /* ClearAuthContextFailed */,
70
- ExceptionTruncated: 52 /* ExceptionTruncated */,
71
- IllegalCharsInName: 53 /* IllegalCharsInName */,
72
- ItemNotInArray: 54 /* ItemNotInArray */,
73
- MaxAjaxPerPVExceeded: 55 /* MaxAjaxPerPVExceeded */,
74
- MessageTruncated: 56 /* MessageTruncated */,
75
- NameTooLong: 57 /* NameTooLong */,
76
- SampleRateOutOfRange: 58 /* SampleRateOutOfRange */,
77
- SetAuthContextFailed: 59 /* SetAuthContextFailed */,
78
- SetAuthContextFailedAccountName: 60 /* SetAuthContextFailedAccountName */,
79
- StringValueTooLong: 61 /* StringValueTooLong */,
80
- StartCalledMoreThanOnce: 62 /* StartCalledMoreThanOnce */,
81
- StopCalledWithoutStart: 63 /* StopCalledWithoutStart */,
82
- TelemetryInitializerFailed: 64 /* TelemetryInitializerFailed */,
83
- TrackArgumentsNotSpecified: 65 /* TrackArgumentsNotSpecified */,
84
- UrlTooLong: 66 /* UrlTooLong */,
85
- SessionStorageBufferFull: 67 /* SessionStorageBufferFull */,
86
- CannotAccessCookie: 68 /* CannotAccessCookie */,
87
- IdTooLong: 69 /* IdTooLong */,
88
- InvalidEvent: 70 /* InvalidEvent */,
89
- FailedMonitorAjaxSetRequestHeader: 71 /* FailedMonitorAjaxSetRequestHeader */,
90
- SendBrowserInfoOnUserInit: 72 /* SendBrowserInfoOnUserInit */,
91
- PluginException: 73 /* PluginException */,
92
- NotificationException: 74 /* NotificationException */,
93
- SnippetScriptLoadFailure: 99 /* SnippetScriptLoadFailure */,
94
- InvalidInstrumentationKey: 100 /* InvalidInstrumentationKey */,
95
- CannotParseAiBlobValue: 101 /* CannotParseAiBlobValue */,
96
- InvalidContentBlob: 102 /* InvalidContentBlob */,
97
- TrackPageActionEventFailed: 103 /* TrackPageActionEventFailed */,
98
- FailedAddingCustomDefinedRequestContext: 104 /* FailedAddingCustomDefinedRequestContext */,
99
- InMemoryStorageBufferFull: 105 /* InMemoryStorageBufferFull */
100
- });
72
+ CannotSerializeObject: 48,
73
+ CannotSerializeObjectNonSerializable: 49,
74
+ CircularReferenceDetected: 50,
75
+ ClearAuthContextFailed: 51,
76
+ ExceptionTruncated: 52,
77
+ IllegalCharsInName: 53,
78
+ ItemNotInArray: 54,
79
+ MaxAjaxPerPVExceeded: 55,
80
+ MessageTruncated: 56,
81
+ NameTooLong: 57,
82
+ SampleRateOutOfRange: 58,
83
+ SetAuthContextFailed: 59,
84
+ SetAuthContextFailedAccountName: 60,
85
+ StringValueTooLong: 61,
86
+ StartCalledMoreThanOnce: 62,
87
+ StopCalledWithoutStart: 63,
88
+ TelemetryInitializerFailed: 64,
89
+ TrackArgumentsNotSpecified: 65,
90
+ UrlTooLong: 66,
91
+ SessionStorageBufferFull: 67,
92
+ CannotAccessCookie: 68,
93
+ IdTooLong: 69,
94
+ InvalidEvent: 70,
95
+ FailedMonitorAjaxSetRequestHeader: 71,
96
+ SendBrowserInfoOnUserInit: 72,
97
+ PluginException: 73,
98
+ NotificationException: 74,
99
+ SnippetScriptLoadFailure: 99,
100
+ InvalidInstrumentationKey: 100,
101
+ CannotParseAiBlobValue: 101,
102
+ InvalidContentBlob: 102,
103
+ TrackPageActionEventFailed: 103,
104
+ FailedAddingCustomDefinedRequestContext: 104,
105
+ InMemoryStorageBufferFull: 105
106
+ };
101
107
  //# sourceMappingURL=LoggingEnums.js.map