@microsoft/applicationinsights-core-js 2.8.13-nightly.2304-40 → 2.8.13-nightly.2304-43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +36 -15
- package/browser/applicationinsights-core-js.js.map +1 -1
- package/browser/applicationinsights-core-js.min.js +2 -2
- package/browser/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.api.json +3 -3
- package/dist/applicationinsights-core-js.d.ts +11 -4
- package/dist/applicationinsights-core-js.js +36 -15
- package/dist/applicationinsights-core-js.js.map +1 -1
- package/dist/applicationinsights-core-js.min.js +2 -2
- package/dist/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.rollup.d.ts +11 -4
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +36 -20
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
- package/dist-esm/__DynamicConstants.js +4 -4
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +1 -1
- package/package.json +1 -1
- package/src/JavaScriptSDK/BaseCore.ts +45 -22
- package/src/JavaScriptSDK.Interfaces/IConfiguration.ts +5 -1
- package/types/JavaScriptSDK/BaseCore.d.ts +5 -2
- package/types/JavaScriptSDK.Interfaces/IConfiguration.d.ts +5 -1
|
@@ -4923,7 +4923,7 @@
|
|
|
4923
4923
|
{
|
|
4924
4924
|
"kind": "Method",
|
|
4925
4925
|
"canonicalReference": "@microsoft/applicationinsights-core-js!BaseCore#pollInternalLogs:member(1)",
|
|
4926
|
-
"docComment": "/**\n *
|
|
4926
|
+
"docComment": "/**\n * Enable the timer that checks the logger.queue for log messages to be flushed. Note: Since 3.0.1 and 2.8.13 this is no longer an interval timer but is a normal timer that is only started when this function is called and then subsequently only _if_ there are any logger.queue messages to be sent.\n */\n",
|
|
4927
4927
|
"excerptTokens": [
|
|
4928
4928
|
{
|
|
4929
4929
|
"kind": "Content",
|
|
@@ -5198,7 +5198,7 @@
|
|
|
5198
5198
|
{
|
|
5199
5199
|
"kind": "Method",
|
|
5200
5200
|
"canonicalReference": "@microsoft/applicationinsights-core-js!BaseCore#stopPollingInternalLogs:member(1)",
|
|
5201
|
-
"docComment": "/**\n *
|
|
5201
|
+
"docComment": "/**\n * Stop the timer that log messages from logger.queue when available\n */\n",
|
|
5202
5202
|
"excerptTokens": [
|
|
5203
5203
|
{
|
|
5204
5204
|
"kind": "Content",
|
|
@@ -12014,7 +12014,7 @@
|
|
|
12014
12014
|
{
|
|
12015
12015
|
"kind": "PropertySignature",
|
|
12016
12016
|
"canonicalReference": "@microsoft/applicationinsights-core-js!IConfiguration#diagnosticLogInterval:member",
|
|
12017
|
-
"docComment": "/**\n *
|
|
12017
|
+
"docComment": "/**\n * Set the timer interval (in ms) for internal logging queue, this is the amount of time to wait after logger.queue messages are detected to be sent. Note: since 2.8.13 and 3.0.1 the diagnostic logger timer is a normal timeout timer and not an interval timer. So this now represents the timer \"delay\" and not the frequency at which the events are sent.\n */\n",
|
|
12018
12018
|
"excerptTokens": [
|
|
12019
12019
|
{
|
|
12020
12020
|
"kind": "Content",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 2.8.13-nightly.2304-
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 2.8.13-nightly.2304-43
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -178,11 +178,14 @@ declare namespace ApplicationInsights {
|
|
|
178
178
|
setPerfMgr(perfMgr: IPerfManager): void;
|
|
179
179
|
eventCnt(): number;
|
|
180
180
|
/**
|
|
181
|
-
*
|
|
181
|
+
* Enable the timer that checks the logger.queue for log messages to be flushed.
|
|
182
|
+
* Note: Since 3.0.1 and 2.8.13 this is no longer an interval timer but is a normal
|
|
183
|
+
* timer that is only started when this function is called and then subsequently
|
|
184
|
+
* only _if_ there are any logger.queue messages to be sent.
|
|
182
185
|
*/
|
|
183
186
|
pollInternalLogs(eventName?: string): number;
|
|
184
187
|
/**
|
|
185
|
-
*
|
|
188
|
+
* Stop the timer that log messages from logger.queue when available
|
|
186
189
|
*/
|
|
187
190
|
stopPollingInternalLogs(): void;
|
|
188
191
|
/**
|
|
@@ -1100,7 +1103,11 @@ declare namespace ApplicationInsights {
|
|
|
1100
1103
|
*/
|
|
1101
1104
|
connectionString?: string;
|
|
1102
1105
|
/**
|
|
1103
|
-
*
|
|
1106
|
+
* Set the timer interval (in ms) for internal logging queue, this is the
|
|
1107
|
+
* amount of time to wait after logger.queue messages are detected to be sent.
|
|
1108
|
+
* Note: since 2.8.13 and 3.0.1 the diagnostic logger timer is a normal timeout timer
|
|
1109
|
+
* and not an interval timer. So this now represents the timer "delay" and not
|
|
1110
|
+
* the frequency at which the events are sent.
|
|
1104
1111
|
*/
|
|
1105
1112
|
diagnosticLogInterval?: number;
|
|
1106
1113
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 2.8.13-nightly.2304-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 2.8.13-nightly.2304-43
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -1696,7 +1696,7 @@
|
|
|
1696
1696
|
}
|
|
1697
1697
|
|
|
1698
1698
|
var _objDefineProperty = ObjDefineProperty;
|
|
1699
|
-
var version = "2.8.13-nightly.2304-
|
|
1699
|
+
var version = "2.8.13-nightly.2304-43";
|
|
1700
1700
|
var instanceName = "." + newId(6);
|
|
1701
1701
|
var _dataUid = 0;
|
|
1702
1702
|
function _createAccessor(target, prop, value) {
|
|
@@ -3548,6 +3548,7 @@
|
|
|
3548
3548
|
var _debugListener;
|
|
3549
3549
|
var _traceCtx;
|
|
3550
3550
|
var _internalLogPoller = 0;
|
|
3551
|
+
var _forceStopInternalLogPoller = false;
|
|
3551
3552
|
dynamicProto(BaseCore, this, function (_self) {
|
|
3552
3553
|
_initDefaults();
|
|
3553
3554
|
_self[_DYN_IS_INITIALIZED ] = function () { return _isInitialized; };
|
|
@@ -3657,19 +3658,32 @@
|
|
|
3657
3658
|
};
|
|
3658
3659
|
_self.pollInternalLogs = function (eventName) {
|
|
3659
3660
|
_internalLogsEventName = eventName || null;
|
|
3660
|
-
|
|
3661
|
-
if (!interval || !(interval > 0)) {
|
|
3662
|
-
interval = 10000;
|
|
3663
|
-
}
|
|
3661
|
+
_forceStopInternalLogPoller = false;
|
|
3664
3662
|
if (_internalLogPoller) {
|
|
3665
3663
|
clearInterval(_internalLogPoller);
|
|
3664
|
+
_internalLogPoller = null;
|
|
3666
3665
|
}
|
|
3667
|
-
|
|
3668
|
-
_flushInternalLogs();
|
|
3669
|
-
}, interval);
|
|
3670
|
-
return _internalLogPoller;
|
|
3666
|
+
return _startInternalLogTimer(true);
|
|
3671
3667
|
};
|
|
3668
|
+
function _startInternalLogTimer(alwaysStart) {
|
|
3669
|
+
if (!_internalLogPoller && !_forceStopInternalLogPoller) {
|
|
3670
|
+
var shouldStart = alwaysStart || (_self[_DYN_LOGGER ] && _self[_DYN_LOGGER ].queue[_DYN_LENGTH ] > 0);
|
|
3671
|
+
if (shouldStart) {
|
|
3672
|
+
var interval = getCfgValue(_config.diagnosticLogInterval);
|
|
3673
|
+
if (!interval || !(interval > 0)) {
|
|
3674
|
+
interval = 10000;
|
|
3675
|
+
}
|
|
3676
|
+
_internalLogPoller = setInterval(function () {
|
|
3677
|
+
clearInterval(_internalLogPoller);
|
|
3678
|
+
_internalLogPoller = 0;
|
|
3679
|
+
_flushInternalLogs();
|
|
3680
|
+
}, interval);
|
|
3681
|
+
}
|
|
3682
|
+
}
|
|
3683
|
+
return _internalLogPoller;
|
|
3684
|
+
}
|
|
3672
3685
|
_self[_DYN_STOP_POLLING_INTERNA3 ] = function () {
|
|
3686
|
+
_forceStopInternalLogPoller = true;
|
|
3673
3687
|
if (_internalLogPoller) {
|
|
3674
3688
|
clearInterval(_internalLogPoller);
|
|
3675
3689
|
_internalLogPoller = 0;
|
|
@@ -3704,6 +3718,7 @@
|
|
|
3704
3718
|
_self[_DYN_STOP_POLLING_INTERNA3 ]();
|
|
3705
3719
|
processUnloadCtx[_DYN_PROCESS_NEXT ](unloadState);
|
|
3706
3720
|
}
|
|
3721
|
+
_flushInternalLogs();
|
|
3707
3722
|
if (!_flushChannels(isAsync, _doUnload, 6 , cbTimeout)) {
|
|
3708
3723
|
_doUnload(false);
|
|
3709
3724
|
}
|
|
@@ -3790,7 +3805,9 @@
|
|
|
3790
3805
|
_traceCtx = null;
|
|
3791
3806
|
}
|
|
3792
3807
|
function _createTelCtx() {
|
|
3793
|
-
|
|
3808
|
+
var theCtx = createProcessTelemetryContext(_getPluginChain(), _config, _self);
|
|
3809
|
+
theCtx[_DYN_ON_COMPLETE ](_startInternalLogTimer);
|
|
3810
|
+
return theCtx;
|
|
3794
3811
|
}
|
|
3795
3812
|
function _initPluginChain(updateState) {
|
|
3796
3813
|
var theExtensions = _validateExtensions(_self[_DYN_LOGGER ], ChannelControllerPriority, _configExtensions);
|
|
@@ -3816,7 +3833,8 @@
|
|
|
3816
3833
|
_coreExtensions[_DYN_PUSH ](_channelControl);
|
|
3817
3834
|
_self[_DYN__EXTENSIONS ] = sortPlugins(allExtensions);
|
|
3818
3835
|
_channelControl[_DYN_INITIALIZE ](_config, _self, allExtensions);
|
|
3819
|
-
|
|
3836
|
+
var initCtx = _createTelCtx();
|
|
3837
|
+
initializePlugins(initCtx, allExtensions);
|
|
3820
3838
|
_self[_DYN__EXTENSIONS ] = objFreeze(sortPlugins(_coreExtensions || [])).slice();
|
|
3821
3839
|
if (updateState) {
|
|
3822
3840
|
_doUpdate(updateState);
|
|
@@ -3912,6 +3930,7 @@
|
|
|
3912
3930
|
_channelConfig = newChannelConfig;
|
|
3913
3931
|
}
|
|
3914
3932
|
removeComplete && removeComplete(removed);
|
|
3933
|
+
_startInternalLogTimer();
|
|
3915
3934
|
});
|
|
3916
3935
|
unloadCtx[_DYN_PROCESS_NEXT ](unloadState);
|
|
3917
3936
|
}
|
|
@@ -3920,8 +3939,9 @@
|
|
|
3920
3939
|
}
|
|
3921
3940
|
}
|
|
3922
3941
|
function _flushInternalLogs() {
|
|
3923
|
-
|
|
3924
|
-
|
|
3942
|
+
if (_self[_DYN_LOGGER ] && _self[_DYN_LOGGER ].queue) {
|
|
3943
|
+
var queue = _self[_DYN_LOGGER ].queue.slice(0);
|
|
3944
|
+
_self[_DYN_LOGGER ].queue[_DYN_LENGTH ] = 0;
|
|
3925
3945
|
arrForEach(queue, function (logMessage) {
|
|
3926
3946
|
var _a;
|
|
3927
3947
|
var item = (_a = {},
|
|
@@ -3933,7 +3953,6 @@
|
|
|
3933
3953
|
_a);
|
|
3934
3954
|
_self.track(item);
|
|
3935
3955
|
});
|
|
3936
|
-
queue[_DYN_LENGTH ] = 0;
|
|
3937
3956
|
}
|
|
3938
3957
|
}
|
|
3939
3958
|
function _flushChannels(isAsync, callBack, sendReason, cbTimeout) {
|
|
@@ -3969,6 +3988,7 @@
|
|
|
3969
3988
|
}
|
|
3970
3989
|
function _doUpdate(updateState) {
|
|
3971
3990
|
var updateCtx = createProcessTelemetryUpdateContext(_getPluginChain(), _self);
|
|
3991
|
+
updateCtx[_DYN_ON_COMPLETE ](_startInternalLogTimer);
|
|
3972
3992
|
if (!_self._updateHook || _self._updateHook(updateCtx, updateState) !== true) {
|
|
3973
3993
|
updateCtx[_DYN_PROCESS_NEXT ](updateState);
|
|
3974
3994
|
}
|
|
@@ -3977,6 +3997,7 @@
|
|
|
3977
3997
|
var logger = _self[_DYN_LOGGER ];
|
|
3978
3998
|
if (logger) {
|
|
3979
3999
|
_throwInternal(logger, 2 , 73 , message);
|
|
4000
|
+
_startInternalLogTimer();
|
|
3980
4001
|
}
|
|
3981
4002
|
else {
|
|
3982
4003
|
throwError(message);
|