@microsoft/applicationinsights-core-js 3.3.0-nightly3.2406-06 → 3.3.0-nightly3.2406-08

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 (100) hide show
  1. package/browser/es5/applicationinsights-core-js.cjs.js +199 -20
  2. package/browser/es5/applicationinsights-core-js.cjs.js.map +1 -1
  3. package/browser/es5/applicationinsights-core-js.cjs.min.js +2 -2
  4. package/browser/es5/applicationinsights-core-js.cjs.min.js.map +1 -1
  5. package/browser/es5/applicationinsights-core-js.gbl.js +201 -22
  6. package/browser/es5/applicationinsights-core-js.gbl.js.map +1 -1
  7. package/browser/es5/applicationinsights-core-js.gbl.min.js +2 -2
  8. package/browser/es5/applicationinsights-core-js.gbl.min.js.map +1 -1
  9. package/browser/es5/applicationinsights-core-js.integrity.json +25 -25
  10. package/browser/es5/applicationinsights-core-js.js +201 -22
  11. package/browser/es5/applicationinsights-core-js.js.map +1 -1
  12. package/browser/es5/applicationinsights-core-js.min.js +2 -2
  13. package/browser/es5/applicationinsights-core-js.min.js.map +1 -1
  14. package/dist/es5/applicationinsights-core-js.js +199 -20
  15. package/dist/es5/applicationinsights-core-js.js.map +1 -1
  16. package/dist/es5/applicationinsights-core-js.min.js +2 -2
  17. package/dist/es5/applicationinsights-core-js.min.js.map +1 -1
  18. package/dist-es5/Config/ConfigDefaultHelpers.js +1 -1
  19. package/dist-es5/Config/ConfigDefaults.js +1 -1
  20. package/dist-es5/Config/DynamicConfig.js +1 -1
  21. package/dist-es5/Config/DynamicProperty.js +1 -1
  22. package/dist-es5/Config/DynamicState.js +1 -1
  23. package/dist-es5/Config/DynamicSupport.js +1 -1
  24. package/dist-es5/Config/IConfigDefaults.js +1 -1
  25. package/dist-es5/Config/IDynamicConfigHandler.js +1 -1
  26. package/dist-es5/Config/IDynamicPropertyHandler.js +1 -1
  27. package/dist-es5/Config/IDynamicWatcher.js +1 -1
  28. package/dist-es5/Config/_IDynamicConfigHandlerState.js +1 -1
  29. package/dist-es5/JavaScriptSDK/AggregationError.js +1 -1
  30. package/dist-es5/JavaScriptSDK/AppInsightsCore.js +166 -20
  31. package/dist-es5/JavaScriptSDK/AppInsightsCore.js.map +1 -1
  32. package/dist-es5/JavaScriptSDK/AsyncUtils.js +1 -1
  33. package/dist-es5/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
  34. package/dist-es5/JavaScriptSDK/Constants.js +1 -1
  35. package/dist-es5/JavaScriptSDK/CookieMgr.js +1 -1
  36. package/dist-es5/JavaScriptSDK/CoreUtils.js +1 -1
  37. package/dist-es5/JavaScriptSDK/DataCacheHelper.js +2 -2
  38. package/dist-es5/JavaScriptSDK/DataCacheHelper.js.map +1 -1
  39. package/dist-es5/JavaScriptSDK/DbgExtensionUtils.js +1 -1
  40. package/dist-es5/JavaScriptSDK/DiagnosticLogger.js +1 -1
  41. package/dist-es5/JavaScriptSDK/EnvUtils.js +1 -1
  42. package/dist-es5/JavaScriptSDK/EventHelpers.js +1 -1
  43. package/dist-es5/JavaScriptSDK/HelperFuncs.js +1 -1
  44. package/dist-es5/JavaScriptSDK/InstrumentHooks.js +1 -1
  45. package/dist-es5/JavaScriptSDK/InternalConstants.js +1 -1
  46. package/dist-es5/JavaScriptSDK/NotificationManager.js +1 -1
  47. package/dist-es5/JavaScriptSDK/PerfManager.js +1 -1
  48. package/dist-es5/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
  49. package/dist-es5/JavaScriptSDK/RandomHelper.js +1 -1
  50. package/dist-es5/JavaScriptSDK/ResponseHelpers.js +1 -1
  51. package/dist-es5/JavaScriptSDK/SenderPostManager.js +4 -4
  52. package/dist-es5/JavaScriptSDK/SenderPostManager.js.map +1 -1
  53. package/dist-es5/JavaScriptSDK/TelemetryHelpers.js +1 -1
  54. package/dist-es5/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
  55. package/dist-es5/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
  56. package/dist-es5/JavaScriptSDK/UnloadHookContainer.js +1 -1
  57. package/dist-es5/JavaScriptSDK/W3cTraceParent.js +1 -1
  58. package/dist-es5/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
  59. package/dist-es5/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  60. package/dist-es5/JavaScriptSDK.Enums/FeatureOptInEnums.js +1 -1
  61. package/dist-es5/JavaScriptSDK.Enums/InitActiveStatusEnum.js +12 -0
  62. package/dist-es5/JavaScriptSDK.Enums/InitActiveStatusEnum.js.map +1 -0
  63. package/dist-es5/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  64. package/dist-es5/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  65. package/dist-es5/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
  66. package/dist-es5/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
  67. package/dist-es5/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  68. package/dist-es5/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  69. package/dist-es5/JavaScriptSDK.Interfaces/IChannelControlsHost.js +1 -1
  70. package/dist-es5/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  71. package/dist-es5/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  72. package/dist-es5/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
  73. package/dist-es5/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  74. package/dist-es5/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
  75. package/dist-es5/JavaScriptSDK.Interfaces/IFeatureOptIn.js +1 -1
  76. package/dist-es5/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  77. package/dist-es5/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  78. package/dist-es5/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  79. package/dist-es5/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  80. package/dist-es5/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  81. package/dist-es5/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  82. package/dist-es5/JavaScriptSDK.Interfaces/ISenderPostManager.js +1 -1
  83. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
  84. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  85. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  86. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  87. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
  88. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
  89. package/dist-es5/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
  90. package/dist-es5/JavaScriptSDK.Interfaces/IUnloadHook.js +1 -1
  91. package/dist-es5/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
  92. package/dist-es5/JavaScriptSDK.Interfaces/IXDomainRequest.js +1 -1
  93. package/dist-es5/JavaScriptSDK.Interfaces/IXHROverride.js +1 -1
  94. package/dist-es5/__DynamicConstants.js +8 -4
  95. package/dist-es5/__DynamicConstants.js.map +1 -1
  96. package/dist-es5/applicationinsights-core-js.js +2 -1
  97. package/dist-es5/applicationinsights-core-js.js.map +1 -1
  98. package/package.json +1 -1
  99. package/types/applicationinsights-core-js.d.ts +71 -5
  100. package/types/applicationinsights-core-js.namespaced.d.ts +71 -5
@@ -1 +1 @@
1
- {"version":3,"file":"applicationinsights-core-js.js.map","sources":["applicationinsights-core-js.js"],"sourcesContent":["export { MinChannelPriorty } from \"./JavaScriptSDK.Interfaces/IChannelControls\";\r\nexport { EventsDiscardedReason, BatchDiscardedReason } from \"./JavaScriptSDK.Enums/EventsDiscardedReason\";\r\nexport { throwAggregationError } from \"./JavaScriptSDK/AggregationError\";\r\nexport { AppInsightsCore } from \"./JavaScriptSDK/AppInsightsCore\";\r\nexport { BaseTelemetryPlugin } from \"./JavaScriptSDK/BaseTelemetryPlugin\";\r\nexport { randomValue, random32, mwcRandomSeed, mwcRandom32, newId } from \"./JavaScriptSDK/RandomHelper\";\r\nexport { Undefined, newGuid, generateW3CId } from \"./JavaScriptSDK/CoreUtils\";\r\nexport { runTargetUnload, doUnloadAll } from \"./JavaScriptSDK/AsyncUtils\";\r\nexport { normalizeJsName, toISOString, getExceptionName, strContains, setValue, getSetValue, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objExtend, isFeatureEnabled, getResponseText, formatErrorMessageXdr, formatErrorMessageXhr, prependTransports, openXhr, _appendHeader, _getAllResponseHeaders, convertAllHeadersToMap } from \"./JavaScriptSDK/HelperFuncs\";\r\nexport { parseResponse } from \"./JavaScriptSDK/ResponseHelpers\";\r\nexport { SenderPostManager } from \"./JavaScriptSDK/SenderPostManager\";\r\nexport { isArray, isTypeof, isUndefined, isNullOrUndefined, objHasOwnProperty as hasOwnProperty, isObject, isFunction, strEndsWith, strStartsWith, isDate, isError, isString, isNumber, isBoolean, arrForEach, arrIndexOf, arrReduce, arrMap, strTrim, objKeys, objDefineAccessors, throwError, isSymbol, isNotTruthy, isTruthy, objFreeze, objSeal, objToString, objDeepFreeze as deepFreeze, getInst as getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, hasNavigator, getNavigator, hasHistory, getHistory, dumpObj, asString, objForEachKey, getPerformance, utcNow as dateNow, perfNow } from \"@nevware21/ts-utils\";\r\nexport { createEnumStyle, createValueMap } from \"./JavaScriptSDK.Enums/EnumHelperFuncs\";\r\nexport { attachEvent, detachEvent, addEventHandler, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, __getRegisteredEvents } from \"./JavaScriptSDK/EventHelpers\";\r\nexport { getCrypto, getMsCrypto, getLocation, hasJSON, getJSON, isReactNative, getConsole, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported, findMetaTag, findNamedServerTiming, sendCustomEvent, dispatchEvent, createCustomDomEvent } from \"./JavaScriptSDK/EnvUtils\";\r\nexport { getGlobal, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from \"@microsoft/applicationinsights-shims\";\r\nexport { NotificationManager } from \"./JavaScriptSDK/NotificationManager\";\r\nexport { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from \"./JavaScriptSDK/PerfManager\";\r\nexport { safeGetLogger, DiagnosticLogger, _InternalLogMessage, _throwInternal, _warnToConsole, _logInternalMessage } from \"./JavaScriptSDK/DiagnosticLogger\";\r\nexport { ProcessTelemetryContext, createProcessTelemetryContext\r\n// Explicitly NOT exporting createProcessTelemetryUnloadContext() and createProcessTelemetryUpdateContext() as these should only be created internally\r\n } from \"./JavaScriptSDK/ProcessTelemetryContext\";\r\nexport { initializePlugins, sortPlugins, unloadComponents } from \"./JavaScriptSDK/TelemetryHelpers\";\r\nexport { LoggingSeverity } from \"./JavaScriptSDK.Enums/LoggingEnums\";\r\nexport { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs, InstrumentEvent } from \"./JavaScriptSDK/InstrumentHooks\";\r\nexport { createCookieMgr, safeGetCookieMgr, uaDisallowsSameSiteNone, areCookiesSupported } from \"./JavaScriptSDK/CookieMgr\";\r\nexport { getDebugListener, getDebugExt } from \"./JavaScriptSDK/DbgExtensionUtils\";\r\nexport { createUniqueNamespace } from \"./JavaScriptSDK/DataCacheHelper\";\r\nexport { createUnloadHandlerContainer } from \"./JavaScriptSDK/UnloadHandlerContainer\";\r\nexport { createUnloadHookContainer, _testHookMaxUnloadHooksCb } from \"./JavaScriptSDK/UnloadHookContainer\";\r\nexport { createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from \"./JavaScriptSDK/W3cTraceParent\";\r\nexport { createDynamicConfig, onConfigChange } from \"./Config/DynamicConfig\";\r\nexport { getDynamicConfigHandler, blockDynamicConversion, forceDynamicConversion } from \"./Config/DynamicSupport\";\r\nexport { cfgDfValidate, cfgDfMerge, cfgDfBoolean, cfgDfFunc, cfgDfString, cfgDfSet, cfgDfBlockPropValue } from \"./Config/ConfigDefaultHelpers\";\r\n//# sourceMappingURL=applicationinsights-core-js.js.map"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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":"applicationinsights-core-js.js.map","sources":["applicationinsights-core-js.js"],"sourcesContent":["export { MinChannelPriorty } from \"./JavaScriptSDK.Interfaces/IChannelControls\";\r\nexport { EventsDiscardedReason, BatchDiscardedReason } from \"./JavaScriptSDK.Enums/EventsDiscardedReason\";\r\nexport { ActiveStatus } from \"./JavaScriptSDK.Enums/InitActiveStatusEnum\";\r\nexport { throwAggregationError } from \"./JavaScriptSDK/AggregationError\";\r\nexport { AppInsightsCore } from \"./JavaScriptSDK/AppInsightsCore\";\r\nexport { BaseTelemetryPlugin } from \"./JavaScriptSDK/BaseTelemetryPlugin\";\r\nexport { randomValue, random32, mwcRandomSeed, mwcRandom32, newId } from \"./JavaScriptSDK/RandomHelper\";\r\nexport { Undefined, newGuid, generateW3CId } from \"./JavaScriptSDK/CoreUtils\";\r\nexport { runTargetUnload, doUnloadAll } from \"./JavaScriptSDK/AsyncUtils\";\r\nexport { normalizeJsName, toISOString, getExceptionName, strContains, setValue, getSetValue, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objExtend, isFeatureEnabled, getResponseText, formatErrorMessageXdr, formatErrorMessageXhr, prependTransports, openXhr, _appendHeader, _getAllResponseHeaders, convertAllHeadersToMap } from \"./JavaScriptSDK/HelperFuncs\";\r\nexport { parseResponse } from \"./JavaScriptSDK/ResponseHelpers\";\r\nexport { SenderPostManager } from \"./JavaScriptSDK/SenderPostManager\";\r\nexport { isArray, isTypeof, isUndefined, isNullOrUndefined, objHasOwnProperty as hasOwnProperty, isObject, isFunction, strEndsWith, strStartsWith, isDate, isError, isString, isNumber, isBoolean, arrForEach, arrIndexOf, arrReduce, arrMap, strTrim, objKeys, objDefineAccessors, throwError, isSymbol, isNotTruthy, isTruthy, objFreeze, objSeal, objToString, objDeepFreeze as deepFreeze, getInst as getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, hasNavigator, getNavigator, hasHistory, getHistory, dumpObj, asString, objForEachKey, getPerformance, utcNow as dateNow, perfNow } from \"@nevware21/ts-utils\";\r\nexport { createEnumStyle, createValueMap } from \"./JavaScriptSDK.Enums/EnumHelperFuncs\";\r\nexport { attachEvent, detachEvent, addEventHandler, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, __getRegisteredEvents } from \"./JavaScriptSDK/EventHelpers\";\r\nexport { getCrypto, getMsCrypto, getLocation, hasJSON, getJSON, isReactNative, getConsole, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported, findMetaTag, findNamedServerTiming, sendCustomEvent, dispatchEvent, createCustomDomEvent } from \"./JavaScriptSDK/EnvUtils\";\r\nexport { getGlobal, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from \"@microsoft/applicationinsights-shims\";\r\nexport { NotificationManager } from \"./JavaScriptSDK/NotificationManager\";\r\nexport { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from \"./JavaScriptSDK/PerfManager\";\r\nexport { safeGetLogger, DiagnosticLogger, _InternalLogMessage, _throwInternal, _warnToConsole, _logInternalMessage } from \"./JavaScriptSDK/DiagnosticLogger\";\r\nexport { ProcessTelemetryContext, createProcessTelemetryContext\r\n// Explicitly NOT exporting createProcessTelemetryUnloadContext() and createProcessTelemetryUpdateContext() as these should only be created internally\r\n } from \"./JavaScriptSDK/ProcessTelemetryContext\";\r\nexport { initializePlugins, sortPlugins, unloadComponents } from \"./JavaScriptSDK/TelemetryHelpers\";\r\nexport { LoggingSeverity } from \"./JavaScriptSDK.Enums/LoggingEnums\";\r\nexport { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs, InstrumentEvent } from \"./JavaScriptSDK/InstrumentHooks\";\r\nexport { createCookieMgr, safeGetCookieMgr, uaDisallowsSameSiteNone, areCookiesSupported } from \"./JavaScriptSDK/CookieMgr\";\r\nexport { getDebugListener, getDebugExt } from \"./JavaScriptSDK/DbgExtensionUtils\";\r\nexport { createUniqueNamespace } from \"./JavaScriptSDK/DataCacheHelper\";\r\nexport { createUnloadHandlerContainer } from \"./JavaScriptSDK/UnloadHandlerContainer\";\r\nexport { createUnloadHookContainer, _testHookMaxUnloadHooksCb } from \"./JavaScriptSDK/UnloadHookContainer\";\r\nexport { createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from \"./JavaScriptSDK/W3cTraceParent\";\r\nexport { createDynamicConfig, onConfigChange } from \"./Config/DynamicConfig\";\r\nexport { getDynamicConfigHandler, blockDynamicConversion, forceDynamicConversion } from \"./Config/DynamicSupport\";\r\nexport { cfgDfValidate, cfgDfMerge, cfgDfBoolean, cfgDfFunc, cfgDfString, cfgDfSet, cfgDfBlockPropValue } from \"./Config/ConfigDefaultHelpers\";\r\n//# sourceMappingURL=applicationinsights-core-js.js.map"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
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.3.0-nightly3.2406-06",
4
+ "version": "3.3.0-nightly3.2406-08",
5
5
  "description": "Microsoft Application Insights Core Javascript SDK",
6
6
  "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
7
7
  "keywords": [
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights Core Javascript SDK, 3.3.0-nightly3.2406-06
2
+ * Microsoft Application Insights Core Javascript SDK, 3.3.0-nightly3.2406-08
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -75,6 +75,10 @@ import { throwError } from '@nevware21/ts-utils';
75
75
  */
76
76
  export declare function __getRegisteredEvents(target: any, eventName?: string, evtNamespace?: string | string[]): _IRegisteredEvents[];
77
77
 
78
+ export declare const ActiveStatus: EnumValue<typeof eActiveStatus>;
79
+
80
+ export declare type ActiveStatus = number | eActiveStatus;
81
+
78
82
  /**
79
83
  * Trys to add an event handler for the specified event to the window, body and document
80
84
  * @param eventName - {string} - The name of the event
@@ -283,6 +287,21 @@ export declare class AppInsightsCore<CfgType extends IConfiguration = IConfigura
283
287
  * @returns A watcher handler instance that can be used to remove itself when being unloaded
284
288
  */
285
289
  onCfgChange(handler: WatcherFunction<CfgType>): IUnloadHook;
290
+ /**
291
+ * Watches and tracks status of initialization process
292
+ * @returns ActiveStatus
293
+ * @since 3.3.0
294
+ * If returned status is active, it means initialization process is completed.
295
+ * If returned status is pending, it means the initialization process is waiting for promieses to be resolved.
296
+ * If returned status is inactive, it means ikey is invalid or can 't get ikey or enpoint url from promsises.
297
+ */
298
+ activeStatus(): eActiveStatus | number;
299
+ /**
300
+ * Set Active Status to pending, which will block the incoming changes until internal promises are resolved
301
+ * @internal Internal use
302
+ * @since 3.3.0
303
+ */
304
+ _setPendingStatus(): void;
286
305
  protected releaseQueue(): void;
287
306
  /**
288
307
  * Hook for Core extensions to allow them to update their own configuration before updating all of the plugins.
@@ -724,6 +743,23 @@ export declare function doUnloadAll<T>(targets: Array<{
724
743
 
725
744
  export { dumpObj }
726
745
 
746
+ export declare const enum eActiveStatus {
747
+ NONE = 0,
748
+ /**
749
+ * inactive status means there might be rejected ikey/endpoint promises or ikey/endpoint resolved is not valid
750
+ */
751
+ INACTIVE = 1,
752
+ /**
753
+ * active mean ikey/endpoint promises is resolved and initializing with ikey/endpoint is successful
754
+ */
755
+ ACTIVE = 2,
756
+ /**
757
+ * Waiting for promises to be resolved
758
+ * NOTE: if status is set to be pending, incoming changes will be dropped until pending status is removed
759
+ */
760
+ PENDING = 3
761
+ }
762
+
727
763
  /**
728
764
  * The eBatchDiscardedReason enumeration contains a set of values that specify the reason for discarding offline batches.
729
765
  */
@@ -865,7 +901,8 @@ export declare const enum _eInternalMessageId {
865
901
  DynamicConfigException = 108,
866
902
  DefaultThrottleMsgKey = 109,
867
903
  CdnDeprecation = 110,
868
- SdkLdrUpdate = 111
904
+ SdkLdrUpdate = 111,
905
+ InitPromiseException = 112
869
906
  }
870
907
 
871
908
  export declare const enum eLoggingSeverity {
@@ -1246,6 +1283,21 @@ export declare interface IAppInsightsCore<CfgType extends IConfiguration = IConf
1246
1283
  * Function used to identify the get w parameter used to identify status bit to some channels
1247
1284
  */
1248
1285
  getWParam: () => number;
1286
+ /**
1287
+ * Watches and tracks status of initialization process
1288
+ * @returns ActiveStatus
1289
+ * @since 3.3.0
1290
+ * If returned status is active, it means initialization process is completed.
1291
+ * If returned status is pending, it means the initialization process is waiting for promieses to be resolved.
1292
+ * If returned status is inactive, it means ikey is invalid or can 't get ikey or enpoint url from promsises.
1293
+ */
1294
+ activeStatus?: () => eActiveStatus | number;
1295
+ /**
1296
+ * Set Active Status to pending, which will block the incoming changes until internal promises are resolved
1297
+ * @internal Internal use
1298
+ * @since 3.3.0
1299
+ */
1300
+ _setPendingStatus?: () => void;
1249
1301
  }
1250
1302
 
1251
1303
  export declare interface IBackendResponse {
@@ -1459,11 +1511,11 @@ export declare interface IConfiguration {
1459
1511
  /**
1460
1512
  * Instrumentation key of resource. Either this or connectionString must be specified.
1461
1513
  */
1462
- instrumentationKey?: string;
1514
+ instrumentationKey?: string | IPromise<string>;
1463
1515
  /**
1464
1516
  * Connection string of resource. Either this or instrumentationKey must be specified.
1465
1517
  */
1466
- connectionString?: string;
1518
+ connectionString?: string | IPromise<string>;
1467
1519
  /**
1468
1520
  * Set the timer interval (in ms) for internal logging queue, this is the
1469
1521
  * amount of time to wait after logger.queue messages are detected to be sent.
@@ -1507,7 +1559,7 @@ export declare interface IConfiguration {
1507
1559
  /**
1508
1560
  * Endpoint where telemetry data is sent
1509
1561
  */
1510
- endpointUrl?: string;
1562
+ endpointUrl?: string | IPromise<string>;
1511
1563
  /**
1512
1564
  * Extension configs loaded in SDK
1513
1565
  */
@@ -1609,6 +1661,20 @@ export declare interface IConfiguration {
1609
1661
  * @defaultValue undefined
1610
1662
  */
1611
1663
  featureOptIn?: IFeatureOptIn;
1664
+ /**
1665
+ * If your connection string, instrumentation key and endpoint url are promises,
1666
+ * this config is to manually set timeout for those promises.
1667
+ * Default: 50000ms
1668
+ * @since 3.3.0
1669
+ */
1670
+ initTimeOut?: number;
1671
+ /**
1672
+ * If your connection string, instrumentation key and endpoint url are promises,
1673
+ * this config is to manually set in memory proxy track calls count limit before promises finished.
1674
+ * Default: 100
1675
+ * @since 3.3.0
1676
+ */
1677
+ initInMemoMaxSize?: number;
1612
1678
  }
1613
1679
 
1614
1680
  export declare interface ICookieMgr {
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights Core Javascript SDK, 3.3.0-nightly3.2406-06
2
+ * Microsoft Application Insights Core Javascript SDK, 3.3.0-nightly3.2406-08
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -17,6 +17,10 @@ declare namespace ApplicationInsights {
17
17
  */
18
18
  function __getRegisteredEvents(target: any, eventName?: string, evtNamespace?: string | string[]): _IRegisteredEvents[];
19
19
 
20
+ const ActiveStatus: EnumValue<typeof eActiveStatus>;
21
+
22
+ type ActiveStatus = number | eActiveStatus;
23
+
20
24
  /**
21
25
  * Trys to add an event handler for the specified event to the window, body and document
22
26
  * @param eventName - {string} - The name of the event
@@ -225,6 +229,21 @@ declare namespace ApplicationInsights {
225
229
  * @returns A watcher handler instance that can be used to remove itself when being unloaded
226
230
  */
227
231
  onCfgChange(handler: WatcherFunction<CfgType>): IUnloadHook;
232
+ /**
233
+ * Watches and tracks status of initialization process
234
+ * @returns ActiveStatus
235
+ * @since 3.3.0
236
+ * If returned status is active, it means initialization process is completed.
237
+ * If returned status is pending, it means the initialization process is waiting for promieses to be resolved.
238
+ * If returned status is inactive, it means ikey is invalid or can 't get ikey or enpoint url from promsises.
239
+ */
240
+ activeStatus(): eActiveStatus | number;
241
+ /**
242
+ * Set Active Status to pending, which will block the incoming changes until internal promises are resolved
243
+ * @internal Internal use
244
+ * @since 3.3.0
245
+ */
246
+ _setPendingStatus(): void;
228
247
  protected releaseQueue(): void;
229
248
  /**
230
249
  * Hook for Core extensions to allow them to update their own configuration before updating all of the plugins.
@@ -996,6 +1015,23 @@ declare namespace ApplicationInsights {
996
1015
  */
997
1016
  function dumpObj(object: any, format?: boolean | number): string;
998
1017
 
1018
+ const enum eActiveStatus {
1019
+ NONE = 0,
1020
+ /**
1021
+ * inactive status means there might be rejected ikey/endpoint promises or ikey/endpoint resolved is not valid
1022
+ */
1023
+ INACTIVE = 1,
1024
+ /**
1025
+ * active mean ikey/endpoint promises is resolved and initializing with ikey/endpoint is successful
1026
+ */
1027
+ ACTIVE = 2,
1028
+ /**
1029
+ * Waiting for promises to be resolved
1030
+ * NOTE: if status is set to be pending, incoming changes will be dropped until pending status is removed
1031
+ */
1032
+ PENDING = 3
1033
+ }
1034
+
999
1035
  /**
1000
1036
  * The eBatchDiscardedReason enumeration contains a set of values that specify the reason for discarding offline batches.
1001
1037
  */
@@ -1137,7 +1173,8 @@ declare namespace ApplicationInsights {
1137
1173
  DynamicConfigException = 108,
1138
1174
  DefaultThrottleMsgKey = 109,
1139
1175
  CdnDeprecation = 110,
1140
- SdkLdrUpdate = 111
1176
+ SdkLdrUpdate = 111,
1177
+ InitPromiseException = 112
1141
1178
  }
1142
1179
 
1143
1180
  const enum eLoggingSeverity {
@@ -1655,6 +1692,21 @@ declare namespace ApplicationInsights {
1655
1692
  * Function used to identify the get w parameter used to identify status bit to some channels
1656
1693
  */
1657
1694
  getWParam: () => number;
1695
+ /**
1696
+ * Watches and tracks status of initialization process
1697
+ * @returns ActiveStatus
1698
+ * @since 3.3.0
1699
+ * If returned status is active, it means initialization process is completed.
1700
+ * If returned status is pending, it means the initialization process is waiting for promieses to be resolved.
1701
+ * If returned status is inactive, it means ikey is invalid or can 't get ikey or enpoint url from promsises.
1702
+ */
1703
+ activeStatus?: () => eActiveStatus | number;
1704
+ /**
1705
+ * Set Active Status to pending, which will block the incoming changes until internal promises are resolved
1706
+ * @internal Internal use
1707
+ * @since 3.3.0
1708
+ */
1709
+ _setPendingStatus?: () => void;
1658
1710
  }
1659
1711
 
1660
1712
  interface IBackendResponse {
@@ -1868,11 +1920,11 @@ declare namespace ApplicationInsights {
1868
1920
  /**
1869
1921
  * Instrumentation key of resource. Either this or connectionString must be specified.
1870
1922
  */
1871
- instrumentationKey?: string;
1923
+ instrumentationKey?: string | IPromise<string>;
1872
1924
  /**
1873
1925
  * Connection string of resource. Either this or instrumentationKey must be specified.
1874
1926
  */
1875
- connectionString?: string;
1927
+ connectionString?: string | IPromise<string>;
1876
1928
  /**
1877
1929
  * Set the timer interval (in ms) for internal logging queue, this is the
1878
1930
  * amount of time to wait after logger.queue messages are detected to be sent.
@@ -1916,7 +1968,7 @@ declare namespace ApplicationInsights {
1916
1968
  /**
1917
1969
  * Endpoint where telemetry data is sent
1918
1970
  */
1919
- endpointUrl?: string;
1971
+ endpointUrl?: string | IPromise<string>;
1920
1972
  /**
1921
1973
  * Extension configs loaded in SDK
1922
1974
  */
@@ -2018,6 +2070,20 @@ declare namespace ApplicationInsights {
2018
2070
  * @defaultValue undefined
2019
2071
  */
2020
2072
  featureOptIn?: IFeatureOptIn;
2073
+ /**
2074
+ * If your connection string, instrumentation key and endpoint url are promises,
2075
+ * this config is to manually set timeout for those promises.
2076
+ * Default: 50000ms
2077
+ * @since 3.3.0
2078
+ */
2079
+ initTimeOut?: number;
2080
+ /**
2081
+ * If your connection string, instrumentation key and endpoint url are promises,
2082
+ * this config is to manually set in memory proxy track calls count limit before promises finished.
2083
+ * Default: 100
2084
+ * @since 3.3.0
2085
+ */
2086
+ initInMemoMaxSize?: number;
2021
2087
  }
2022
2088
 
2023
2089
  interface ICookieMgr {