@microsoft/applicationinsights-core-js 3.0.0-beta.2210-12 → 3.0.0-beta.2210-14

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 (77) hide show
  1. package/browser/applicationinsights-core-js.integrity.json +9 -9
  2. package/browser/applicationinsights-core-js.js +20 -17
  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.d.ts +1 -1
  7. package/dist/applicationinsights-core-js.js +20 -17
  8. package/dist/applicationinsights-core-js.js.map +1 -1
  9. package/dist/applicationinsights-core-js.min.js +2 -2
  10. package/dist/applicationinsights-core-js.min.js.map +1 -1
  11. package/dist/applicationinsights-core-js.rollup.d.ts +1 -1
  12. package/dist-esm/Config/ConfigDefaults.js +1 -1
  13. package/dist-esm/Config/DynamicConfig.js +1 -1
  14. package/dist-esm/Config/DynamicProperty.js +1 -1
  15. package/dist-esm/Config/DynamicState.js +1 -1
  16. package/dist-esm/Config/DynamicSupport.js +1 -1
  17. package/dist-esm/Config/IConfigDefaults.js +1 -1
  18. package/dist-esm/Config/IDynamicConfigHandler.js +1 -1
  19. package/dist-esm/Config/IDynamicPropertyHandler.js +1 -1
  20. package/dist-esm/Config/IDynamicWatcher.js +1 -1
  21. package/dist-esm/Config/_IDynamicConfigHandlerState.js +1 -1
  22. package/dist-esm/JavaScriptSDK/AggregationError.js +1 -1
  23. package/dist-esm/JavaScriptSDK/AppInsightsCore.js +21 -18
  24. package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
  25. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
  26. package/dist-esm/JavaScriptSDK/ChannelController.js +1 -1
  27. package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
  28. package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
  29. package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
  30. package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
  31. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
  32. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
  33. package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
  34. package/dist-esm/JavaScriptSDK/EventHelpers.js +1 -1
  35. package/dist-esm/JavaScriptSDK/HelperFuncs.js +1 -1
  36. package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
  37. package/dist-esm/JavaScriptSDK/InternalConstants.js +1 -1
  38. package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
  39. package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
  40. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
  41. package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
  42. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
  43. package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
  44. package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
  45. package/dist-esm/JavaScriptSDK/W3cTraceParent.js +1 -1
  46. package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
  47. package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  48. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  49. package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  50. package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
  51. package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
  52. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +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/IDistributedTraceContext.js +1 -1
  59. package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  60. package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  61. package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  62. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  63. package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  64. package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  65. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
  66. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  67. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  68. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  69. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
  70. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
  71. package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
  72. package/dist-esm/JavaScriptSDK.Interfaces/IUnloadHook.js +1 -1
  73. package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
  74. package/dist-esm/__DynamicConstants.js +1 -1
  75. package/dist-esm/applicationinsights-core-js.js +1 -1
  76. package/package.json +1 -1
  77. package/src/JavaScriptSDK/AppInsightsCore.ts +21 -21
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  //
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  import { isArray, isString, strTrim } from "@nevware21/ts-utils";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-12
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export { MinChannelPriorty } from "./JavaScriptSDK.Interfaces/IChannelControls";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@microsoft/applicationinsights-core-js",
3
3
  "author": "Microsoft Application Insights Team",
4
- "version": "3.0.0-beta.2210-12",
4
+ "version": "3.0.0-beta.2210-14",
5
5
  "description": "Microsoft Application Insights Core Javascript SDK",
6
6
  "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
7
7
  "keywords": [
@@ -259,8 +259,9 @@ export class AppInsightsCore implements IAppInsightsCore {
259
259
  throwError("Core cannot be initialized more than once");
260
260
  }
261
261
 
262
- // Re-assigning the local config property so we don't have any references to the passed value and it can be garbage collected
263
262
  _configHandler = createDynamicConfig(config, defaultConfig, logger || _self.logger, false);
263
+
264
+ // Re-assigning the local config property so we don't have any references to the passed value and it can be garbage collected
264
265
  config = _configHandler.cfg;
265
266
 
266
267
  // This will be "re-run" if the referenced config properties are changed
@@ -572,21 +573,23 @@ export class AppInsightsCore implements IAppInsightsCore {
572
573
  };
573
574
 
574
575
  _self.updateCfg = <T extends IConfiguration = IConfiguration>(newConfig: T, mergeExisting: boolean = true) => {
575
- let updateState: ITelemetryUpdateState = {
576
- reason: TelemetryUpdateReason.ConfigurationChanged,
577
- cfg: _configHandler.cfg,
578
- oldCfg: deepExtend({}, _configHandler.cfg),
579
- newConfig: deepExtend({}, newConfig),
580
- merge: mergeExisting
581
- };
582
-
583
- newConfig = updateState.newConfig as T;
576
+ let updateState: ITelemetryUpdateState;
577
+ if (_self.isInitialized()) {
578
+ updateState = {
579
+ reason: TelemetryUpdateReason.ConfigurationChanged,
580
+ cfg: _configHandler.cfg,
581
+ oldCfg: deepExtend({}, _configHandler.cfg),
582
+ newConfig: deepExtend({}, newConfig),
583
+ merge: mergeExisting
584
+ };
584
585
 
585
- let cfg = _configHandler.cfg;
586
+ newConfig = updateState.newConfig as T;
587
+ let cfg = _configHandler.cfg;
586
588
 
587
- // replace the immutable values
588
- newConfig.extensions = cfg.extensions;
589
- newConfig.channels = cfg.channels;
589
+ // replace the immutable (if initialized) values
590
+ newConfig.extensions = cfg.extensions;
591
+ newConfig.channels = cfg.channels;
592
+ }
590
593
 
591
594
  // We don't currently allow updating the extensions and channels via the update config
592
595
  // So overwriting any user provided values to reuse the existing values
@@ -615,8 +618,9 @@ export class AppInsightsCore implements IAppInsightsCore {
615
618
  // Now execute all of the listeners (synchronously) so they update their values immediately
616
619
  _configHandler.notify();
617
620
 
618
- _doUpdate(updateState);
619
-
621
+ if (updateState) {
622
+ _doUpdate(updateState);
623
+ }
620
624
  };
621
625
 
622
626
  _self.evtNamespace = (): string => {
@@ -672,14 +676,10 @@ export class AppInsightsCore implements IAppInsightsCore {
672
676
  enumerable: true,
673
677
  get: () => _configHandler.cfg,
674
678
  set: (newValue) => {
675
- if (_self.isInitialized()) {
676
- _self.updateCfg(newValue, false);
677
- }
679
+ _self.updateCfg(newValue, false);
678
680
  }
679
681
  });
680
682
 
681
-
682
-
683
683
  _self.logger = new DiagnosticLogger(_configHandler.cfg);
684
684
  _self._extensions = [];
685
685