@microsoft/applicationinsights-web-basic 3.3.0-nightly3.2406-07 → 3.3.0-nightly3.2406-09
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/es5/{aib.3.3.0-nightly3.2406-07.cjs.js → aib.3.3.0-nightly3.2406-09.cjs.js} +299 -77
- package/browser/es5/aib.3.3.0-nightly3.2406-09.cjs.js.map +1 -0
- package/browser/es5/aib.3.3.0-nightly3.2406-09.cjs.min.js +6 -0
- package/browser/es5/aib.3.3.0-nightly3.2406-09.cjs.min.js.map +1 -0
- package/browser/es5/{aib.3.3.0-nightly3.2406-07.gbl.js → aib.3.3.0-nightly3.2406-09.gbl.js} +301 -79
- package/browser/es5/aib.3.3.0-nightly3.2406-09.gbl.js.map +1 -0
- package/browser/es5/aib.3.3.0-nightly3.2406-09.gbl.min.js +6 -0
- package/browser/es5/aib.3.3.0-nightly3.2406-09.gbl.min.js.map +1 -0
- package/browser/es5/aib.3.3.0-nightly3.2406-09.integrity.json +66 -0
- package/browser/es5/{aib.3.3.0-nightly3.2406-07.js → aib.3.3.0-nightly3.2406-09.js} +301 -79
- package/browser/es5/aib.3.3.0-nightly3.2406-09.js.map +1 -0
- package/browser/es5/aib.3.3.0-nightly3.2406-09.min.js +6 -0
- package/browser/es5/aib.3.3.0-nightly3.2406-09.min.js.map +1 -0
- package/browser/es5/aib.3.cjs.js +298 -76
- package/browser/es5/aib.3.cjs.js.map +1 -1
- package/browser/es5/aib.3.cjs.min.js +2 -2
- package/browser/es5/aib.3.cjs.min.js.map +1 -1
- package/browser/es5/aib.3.gbl.js +300 -78
- package/browser/es5/aib.3.gbl.js.map +1 -1
- package/browser/es5/aib.3.gbl.min.js +2 -2
- package/browser/es5/aib.3.gbl.min.js.map +1 -1
- package/browser/es5/aib.3.integrity.json +25 -25
- package/browser/es5/aib.3.js +300 -78
- package/browser/es5/aib.3.js.map +1 -1
- package/browser/es5/aib.3.min.js +2 -2
- package/browser/es5/aib.3.min.js.map +1 -1
- package/dist/es5/applicationinsights-web-basic.js +298 -76
- package/dist/es5/applicationinsights-web-basic.js.map +1 -1
- package/dist/es5/applicationinsights-web-basic.min.js +2 -2
- package/dist/es5/applicationinsights-web-basic.min.js.map +1 -1
- package/dist-es5/__DynamicConstants.js +6 -4
- package/dist-es5/__DynamicConstants.js.map +1 -1
- package/dist-es5/index.js +40 -9
- package/dist-es5/index.js.map +1 -1
- package/package.json +4 -4
- package/types/applicationinsights-web-basic.d.ts +1 -1
- package/types/applicationinsights-web-basic.namespaced.d.ts +67 -5
- package/browser/es5/aib.3.3.0-nightly3.2406-07.cjs.js.map +0 -1
- package/browser/es5/aib.3.3.0-nightly3.2406-07.cjs.min.js +0 -6
- package/browser/es5/aib.3.3.0-nightly3.2406-07.cjs.min.js.map +0 -1
- package/browser/es5/aib.3.3.0-nightly3.2406-07.gbl.js.map +0 -1
- package/browser/es5/aib.3.3.0-nightly3.2406-07.gbl.min.js +0 -6
- package/browser/es5/aib.3.3.0-nightly3.2406-07.gbl.min.js.map +0 -1
- package/browser/es5/aib.3.3.0-nightly3.2406-07.integrity.json +0 -66
- package/browser/es5/aib.3.3.0-nightly3.2406-07.js.map +0 -1
- package/browser/es5/aib.3.3.0-nightly3.2406-07.min.js +0 -6
- package/browser/es5/aib.3.3.0-nightly3.2406-07.min.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript Web SDK - Basic, 3.3.0-nightly3.2406-
|
|
2
|
+
* Application Insights JavaScript Web SDK - Basic, 3.3.0-nightly3.2406-09
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
typeof exports === "object" && typeof module !== undef ? factory(exports) :
|
|
8
8
|
typeof define === "function" && define.amd ? define(["exports"], factory) :
|
|
9
9
|
(function(global){
|
|
10
|
-
var nsKey, key, nm, theExports = {}, modName = "
|
|
11
|
-
var mods={}, modDetail=mods[modName]={}, ver="3.3.0-nightly3.2406-
|
|
10
|
+
var nsKey, key, nm, theExports = {}, modName = "es5_aib_3_3_0_nightly3_2406_09", msMod="__ms$mod__";
|
|
11
|
+
var mods={}, modDetail=mods[modName]={}, ver="3.3.0-nightly3.2406-09";
|
|
12
12
|
var baseNs=global, nsKey="Microsoft", baseNs=baseNs[nsKey]=(baseNs[nsKey]||{});
|
|
13
13
|
// Versioned namespace "Microsoft.ApplicationInsights3"
|
|
14
14
|
var exportNs=baseNs, nsKey="ApplicationInsights3", exportNs=exportNs[nsKey]=(exportNs[nsKey]||{});
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
'use strict';
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
/*! https://github.com/nevware21/ts-utils v0.11.
|
|
33
|
+
/*! https://github.com/nevware21/ts-utils v0.11.3 */
|
|
34
34
|
/*#__NO_SIDE_EFFECTS__*/
|
|
35
35
|
function _pureAssign(func1, func2) {
|
|
36
36
|
return func1 || func2;
|
|
@@ -159,14 +159,52 @@ function objForEachKey(theObject, callbackfn, thisArg) {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
+
var propMap = {
|
|
163
|
+
e: "enumerable",
|
|
164
|
+
c: "configurable",
|
|
165
|
+
v: "value",
|
|
166
|
+
w: "writable",
|
|
167
|
+
g: "get",
|
|
168
|
+
s: "set"
|
|
169
|
+
};
|
|
170
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
171
|
+
function _createProp(value) {
|
|
172
|
+
var prop = {};
|
|
173
|
+
prop[propMap["c"]] = true;
|
|
174
|
+
prop[propMap["e"]] = true;
|
|
175
|
+
if (value.l) {
|
|
176
|
+
prop.get = function () { return value.l.v; };
|
|
177
|
+
var desc = objGetOwnPropertyDescriptor(value.l, "v");
|
|
178
|
+
if (desc && desc.set) {
|
|
179
|
+
prop.set = function (newValue) {
|
|
180
|
+
value.l.v = newValue;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
objForEachKey(value, function (key, value) {
|
|
185
|
+
prop[propMap[key]] = isUndefined(value) ? prop[propMap[key]] : value;
|
|
186
|
+
});
|
|
187
|
+
return prop;
|
|
188
|
+
}
|
|
189
|
+
var objDefineProp = ( /*#__PURE__*/_pureRef(ObjClass$1, "defineProperty"));
|
|
190
|
+
function objDefine(target, key, propDesc) {
|
|
191
|
+
return objDefineProp(target, key, _createProp(propDesc));
|
|
192
|
+
}
|
|
162
193
|
/*#__NO_SIDE_EFFECTS__*/
|
|
163
|
-
function _createKeyValueMap(values, keyType, valueType, completeFn) {
|
|
194
|
+
function _createKeyValueMap(values, keyType, valueType, completeFn, writable) {
|
|
164
195
|
var theMap = {};
|
|
165
196
|
objForEachKey(values, function (key, value) {
|
|
166
|
-
theMap
|
|
167
|
-
theMap
|
|
197
|
+
_assignMapValue(theMap, key, keyType ? value : key, writable);
|
|
198
|
+
_assignMapValue(theMap, value, valueType ? value : key, writable);
|
|
199
|
+
});
|
|
200
|
+
return completeFn ? completeFn(theMap) : theMap;
|
|
201
|
+
}
|
|
202
|
+
function _assignMapValue(theMap, key, value, writable) {
|
|
203
|
+
objDefineProp(theMap, key, {
|
|
204
|
+
value: value,
|
|
205
|
+
enumerable: true,
|
|
206
|
+
writable: !!writable
|
|
168
207
|
});
|
|
169
|
-
return completeFn(theMap);
|
|
170
208
|
}
|
|
171
209
|
var asString = ( /* #__PURE__ */_pureAssign(StrCls));
|
|
172
210
|
var ERROR_TYPE = "[object Error]";
|
|
@@ -206,7 +244,7 @@ function objDeepFreeze(value) {
|
|
|
206
244
|
if (_objFreeze) {
|
|
207
245
|
objForEachKey(value, function (key, value) {
|
|
208
246
|
if (isArray(value) || isObject(value)) {
|
|
209
|
-
|
|
247
|
+
objDeepFreeze(value);
|
|
210
248
|
}
|
|
211
249
|
});
|
|
212
250
|
}
|
|
@@ -216,20 +254,20 @@ var objFreeze = ( /* #__PURE__*/_pureAssign(_objFreeze, _doNothing));
|
|
|
216
254
|
var objGetPrototypeOf = ( /* #__PURE__*/_pureAssign(( /* #__PURE__*/_pureRef(ObjClass$1, "getPrototypeOf")), _getProto));
|
|
217
255
|
/*#__NO_SIDE_EFFECTS__*/
|
|
218
256
|
function createEnum(values) {
|
|
219
|
-
return _createKeyValueMap(values, 1 , 0 ,
|
|
257
|
+
return _createKeyValueMap(values, 1 , 0 , objFreeze);
|
|
220
258
|
}
|
|
221
259
|
/*#__NO_SIDE_EFFECTS__*/
|
|
222
260
|
function createEnumKeyMap(values) {
|
|
223
|
-
return _createKeyValueMap(values, 0 , 0 ,
|
|
261
|
+
return _createKeyValueMap(values, 0 , 0 , objFreeze);
|
|
224
262
|
}
|
|
225
263
|
/*#__NO_SIDE_EFFECTS__*/
|
|
226
264
|
function createSimpleMap(values) {
|
|
227
265
|
var mapClass = {};
|
|
228
266
|
objForEachKey(values, function (key, value) {
|
|
229
|
-
mapClass
|
|
230
|
-
mapClass
|
|
267
|
+
_assignMapValue(mapClass, key, value[1]);
|
|
268
|
+
_assignMapValue(mapClass, value[0], value[1]);
|
|
231
269
|
});
|
|
232
|
-
return
|
|
270
|
+
return objFreeze(mapClass);
|
|
233
271
|
}
|
|
234
272
|
/*#__NO_SIDE_EFFECTS__*/
|
|
235
273
|
function createTypeMap(values) {
|
|
@@ -363,37 +401,6 @@ function polyGetKnownSymbol(name) {
|
|
|
363
401
|
}
|
|
364
402
|
return result;
|
|
365
403
|
}
|
|
366
|
-
var propMap = {
|
|
367
|
-
e: "enumerable",
|
|
368
|
-
c: "configurable",
|
|
369
|
-
v: "value",
|
|
370
|
-
w: "writable",
|
|
371
|
-
g: "get",
|
|
372
|
-
s: "set"
|
|
373
|
-
};
|
|
374
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
375
|
-
function _createProp(value) {
|
|
376
|
-
var prop = {};
|
|
377
|
-
prop[propMap["c"]] = true;
|
|
378
|
-
prop[propMap["e"]] = true;
|
|
379
|
-
if (value.l) {
|
|
380
|
-
prop.get = function () { return value.l.v; };
|
|
381
|
-
var desc = objGetOwnPropertyDescriptor(value.l, "v");
|
|
382
|
-
if (desc && desc.set) {
|
|
383
|
-
prop.set = function (newValue) {
|
|
384
|
-
value.l.v = newValue;
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
objForEachKey(value, function (key, value) {
|
|
389
|
-
prop[propMap[key]] = isUndefined(value) ? prop[propMap[key]] : value;
|
|
390
|
-
});
|
|
391
|
-
return prop;
|
|
392
|
-
}
|
|
393
|
-
var objDefineProp = ( /*#__PURE__*/_pureRef(ObjClass$1, "defineProperty"));
|
|
394
|
-
function objDefine(target, key, propDesc) {
|
|
395
|
-
return objDefineProp(target, key, _createProp(propDesc));
|
|
396
|
-
}
|
|
397
404
|
var _globalLazyTestHooks;
|
|
398
405
|
function _initTestHooks() {
|
|
399
406
|
_globalLazyTestHooks = _getGlobalConfig();
|
|
@@ -1262,6 +1269,13 @@ function __spreadArrayFn(to, from) {
|
|
|
1262
1269
|
var createEnumStyle = createEnum;
|
|
1263
1270
|
var createValueMap = createTypeMap;
|
|
1264
1271
|
|
|
1272
|
+
var ActiveStatus = createEnumStyle({
|
|
1273
|
+
NONE: 0 ,
|
|
1274
|
+
PENDING: 3 ,
|
|
1275
|
+
INACTIVE: 1 ,
|
|
1276
|
+
ACTIVE: 2
|
|
1277
|
+
});
|
|
1278
|
+
|
|
1265
1279
|
var _DYN_TO_LOWER_CASE$1 = "toLowerCase";
|
|
1266
1280
|
var _DYN_BLK_VAL = "blkVal";
|
|
1267
1281
|
var _DYN_LENGTH$2 = "length";
|
|
@@ -1282,13 +1296,17 @@ var _DYN_IDENTIFIER = "identifier";
|
|
|
1282
1296
|
var _DYN_REMOVE_NOTIFICATION_0 = "removeNotificationListener";
|
|
1283
1297
|
var _DYN_ADD_NOTIFICATION_LIS1 = "addNotificationListener";
|
|
1284
1298
|
var _DYN_IS_INITIALIZED = "isInitialized";
|
|
1299
|
+
var _DYN_INSTRUMENTATION_KEY$2 = "instrumentationKey";
|
|
1300
|
+
var _DYN__INACTIVE = "INACTIVE";
|
|
1301
|
+
var _DYN_VALUE = "value";
|
|
1285
1302
|
var _DYN_GET_NOTIFY_MGR = "getNotifyMgr";
|
|
1286
1303
|
var _DYN_GET_PLUGIN = "getPlugin";
|
|
1287
|
-
var _DYN_POLL_INTERNAL_LOGS = "pollInternalLogs";
|
|
1288
1304
|
var _DYN_NAME$2 = "name";
|
|
1305
|
+
var _DYN_I_KEY = "iKey";
|
|
1289
1306
|
var _DYN_TIME = "time";
|
|
1290
1307
|
var _DYN_PROCESS_NEXT = "processNext";
|
|
1291
1308
|
var _DYN_GET_PROCESS_TEL_CONT2 = "getProcessTelContext";
|
|
1309
|
+
var _DYN_POLL_INTERNAL_LOGS = "pollInternalLogs";
|
|
1292
1310
|
var _DYN_ENABLED = "enabled";
|
|
1293
1311
|
var _DYN_STOP_POLLING_INTERNA3 = "stopPollingInternalLogs";
|
|
1294
1312
|
var _DYN_UNLOAD = "unload";
|
|
@@ -1638,6 +1656,54 @@ function _createAllPromise(newPromise) {
|
|
|
1638
1656
|
}, additionalArgs);
|
|
1639
1657
|
};
|
|
1640
1658
|
}
|
|
1659
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
1660
|
+
function _createAllSettledPromise(newPromise) {
|
|
1661
|
+
return createCachedValue(function (input) {
|
|
1662
|
+
var additionalArgs = arrSlice(arguments, 1);
|
|
1663
|
+
return newPromise(function (resolve, reject) {
|
|
1664
|
+
var values = [];
|
|
1665
|
+
var pending = 1;
|
|
1666
|
+
function processItem(item, idx) {
|
|
1667
|
+
pending++;
|
|
1668
|
+
doAwaitResponse(item, function (value) {
|
|
1669
|
+
if (value.rejected) {
|
|
1670
|
+
values[idx] = {
|
|
1671
|
+
status: REJECTED,
|
|
1672
|
+
reason: value.reason
|
|
1673
|
+
};
|
|
1674
|
+
}
|
|
1675
|
+
else {
|
|
1676
|
+
values[idx] = {
|
|
1677
|
+
status: "fulfilled",
|
|
1678
|
+
value: value.value
|
|
1679
|
+
};
|
|
1680
|
+
}
|
|
1681
|
+
if (--pending === 0) {
|
|
1682
|
+
resolve(values);
|
|
1683
|
+
}
|
|
1684
|
+
});
|
|
1685
|
+
}
|
|
1686
|
+
try {
|
|
1687
|
+
if (isArray(input)) {
|
|
1688
|
+
arrForEach(input, processItem);
|
|
1689
|
+
}
|
|
1690
|
+
else if (isIterable(input)) {
|
|
1691
|
+
iterForOf(input, processItem);
|
|
1692
|
+
}
|
|
1693
|
+
else {
|
|
1694
|
+
throwTypeError("Input is not an iterable");
|
|
1695
|
+
}
|
|
1696
|
+
pending--;
|
|
1697
|
+
if (pending === 0) {
|
|
1698
|
+
resolve(values);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
catch (e) {
|
|
1702
|
+
reject(e);
|
|
1703
|
+
}
|
|
1704
|
+
}, additionalArgs);
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1641
1707
|
function syncItemProcessor(pending) {
|
|
1642
1708
|
arrForEach(pending, function (fn) {
|
|
1643
1709
|
try {
|
|
@@ -1689,11 +1755,16 @@ function createNativePromise(executor, timeout) {
|
|
|
1689
1755
|
return thePromise;
|
|
1690
1756
|
}
|
|
1691
1757
|
var _promiseCreator;
|
|
1758
|
+
var _allSettledCreator;
|
|
1692
1759
|
function createPromise(executor, timeout) {
|
|
1693
1760
|
!_promiseCreator && (_promiseCreator = createCachedValue(createNativePromise));
|
|
1694
1761
|
return _promiseCreator.v.call(this, executor, timeout);
|
|
1695
1762
|
}
|
|
1696
1763
|
var createAllPromise = /*#__PURE__*/ _createAllPromise(createPromise);
|
|
1764
|
+
function createAllSettledPromise(input, timeout) {
|
|
1765
|
+
!_allSettledCreator && (_allSettledCreator = _createAllSettledPromise(createPromise));
|
|
1766
|
+
return _allSettledCreator.v(input, timeout);
|
|
1767
|
+
}
|
|
1697
1768
|
|
|
1698
1769
|
var UNDEFINED_VALUE$1 = undefined;
|
|
1699
1770
|
var STR_EMPTY$1 = "";
|
|
@@ -2191,7 +2262,7 @@ function newId(maxLength) {
|
|
|
2191
2262
|
return result;
|
|
2192
2263
|
}
|
|
2193
2264
|
|
|
2194
|
-
var version = '3.3.0-nightly3.2406-
|
|
2265
|
+
var version = '3.3.0-nightly3.2406-09';
|
|
2195
2266
|
var instanceName = "." + newId(6);
|
|
2196
2267
|
var _dataUid = 0;
|
|
2197
2268
|
function _canAcceptData(target) {
|
|
@@ -4431,6 +4502,8 @@ var strValidationError = "Plugins must provide initialize method";
|
|
|
4431
4502
|
var strNotificationManager = "_notificationManager";
|
|
4432
4503
|
var strSdkUnloadingError = "SDK is still unloading...";
|
|
4433
4504
|
var strSdkNotInitialized = "SDK is not initialized";
|
|
4505
|
+
var maxInitQueueSize = 100;
|
|
4506
|
+
var maxInitTimeout = 50000;
|
|
4434
4507
|
var defaultConfig = objDeepFreeze((_a$1 = {
|
|
4435
4508
|
cookieCfg: {}
|
|
4436
4509
|
},
|
|
@@ -4587,15 +4660,23 @@ var AppInsightsCore = /** @class */ (function () {
|
|
|
4587
4660
|
var _extensions;
|
|
4588
4661
|
var _pluginVersionStringArr;
|
|
4589
4662
|
var _pluginVersionString;
|
|
4663
|
+
var _activeStatus;
|
|
4664
|
+
var _endpoint;
|
|
4665
|
+
var _initInMemoMaxSize;
|
|
4666
|
+
var _isStatusSet;
|
|
4590
4667
|
var _internalLogPoller;
|
|
4591
4668
|
var _internalLogPollerListening;
|
|
4592
4669
|
var _forceStopInternalLogPoller;
|
|
4593
4670
|
dynamicProto(AppInsightsCore, this, function (_self) {
|
|
4594
4671
|
_initDefaults();
|
|
4595
4672
|
_self["_getDbgPlgTargets"] = function () {
|
|
4596
|
-
return [_extensions];
|
|
4673
|
+
return [_extensions, _eventQueue];
|
|
4597
4674
|
};
|
|
4598
4675
|
_self[_DYN_IS_INITIALIZED ] = function () { return _isInitialized; };
|
|
4676
|
+
_self.activeStatus = function () { return _activeStatus; };
|
|
4677
|
+
_self._setPendingStatus = function () {
|
|
4678
|
+
_activeStatus = 3 ;
|
|
4679
|
+
};
|
|
4599
4680
|
_self[_DYN_INITIALIZE$1 ] = function (config, extensions, logger, notificationManager) {
|
|
4600
4681
|
if (_isUnloading) {
|
|
4601
4682
|
throwError(strSdkUnloadingError);
|
|
@@ -4606,14 +4687,88 @@ var AppInsightsCore = /** @class */ (function () {
|
|
|
4606
4687
|
_configHandler = createDynamicConfig(config, defaultConfig, logger || _self[_DYN_LOGGER ], false);
|
|
4607
4688
|
config = _configHandler.cfg;
|
|
4608
4689
|
_addUnloadHook(_configHandler[_DYN_WATCH ](function (details) {
|
|
4609
|
-
|
|
4690
|
+
var rootCfg = details.cfg;
|
|
4691
|
+
var isPending = _activeStatus === 3 ;
|
|
4692
|
+
if (isPending) {
|
|
4693
|
+
return;
|
|
4694
|
+
}
|
|
4695
|
+
_initInMemoMaxSize = rootCfg.initInMemoMaxSize || maxInitQueueSize;
|
|
4696
|
+
var ikey = rootCfg[_DYN_INSTRUMENTATION_KEY$2 ];
|
|
4697
|
+
var endpointUrl = rootCfg.endpointUrl;
|
|
4698
|
+
if (isNullOrUndefined(ikey)) {
|
|
4699
|
+
_instrumentationKey = null;
|
|
4700
|
+
_activeStatus = ActiveStatus[_DYN__INACTIVE ];
|
|
4701
|
+
var msg = "Please provide instrumentation key";
|
|
4702
|
+
if (!_isInitialized) {
|
|
4703
|
+
throwError(msg);
|
|
4704
|
+
}
|
|
4705
|
+
else {
|
|
4706
|
+
_throwInternal(_logger, 1 , 100 , msg);
|
|
4707
|
+
_releaseQueues();
|
|
4708
|
+
}
|
|
4709
|
+
return;
|
|
4710
|
+
}
|
|
4711
|
+
var promises = [];
|
|
4712
|
+
if (isPromiseLike(ikey)) {
|
|
4713
|
+
promises[_DYN_PUSH$2 ](ikey);
|
|
4714
|
+
_instrumentationKey = null;
|
|
4715
|
+
}
|
|
4716
|
+
else {
|
|
4717
|
+
_instrumentationKey = ikey;
|
|
4718
|
+
}
|
|
4719
|
+
if (isPromiseLike(endpointUrl)) {
|
|
4720
|
+
promises[_DYN_PUSH$2 ](endpointUrl);
|
|
4721
|
+
_endpoint = null;
|
|
4722
|
+
}
|
|
4723
|
+
else {
|
|
4724
|
+
_endpoint = endpointUrl;
|
|
4725
|
+
}
|
|
4726
|
+
if (promises[_DYN_LENGTH$2 ]) {
|
|
4727
|
+
_isStatusSet = false;
|
|
4728
|
+
_activeStatus = 3 ;
|
|
4729
|
+
var initTimeout = isNotNullOrUndefined(rootCfg.initTimeOut) ? rootCfg.initTimeOut : maxInitTimeout;
|
|
4730
|
+
var allPromises = createAllSettledPromise(promises);
|
|
4731
|
+
scheduleTimeout(function () {
|
|
4732
|
+
if (!_isStatusSet) {
|
|
4733
|
+
_setStatus();
|
|
4734
|
+
}
|
|
4735
|
+
}, initTimeout);
|
|
4736
|
+
doAwaitResponse(allPromises, function (response) {
|
|
4737
|
+
try {
|
|
4738
|
+
if (_isStatusSet) {
|
|
4739
|
+
return;
|
|
4740
|
+
}
|
|
4741
|
+
if (!response.rejected) {
|
|
4742
|
+
var values = response[_DYN_VALUE ];
|
|
4743
|
+
if (values && values[_DYN_LENGTH$2 ]) {
|
|
4744
|
+
var ikeyRes = values[0];
|
|
4745
|
+
_instrumentationKey = ikeyRes && ikeyRes[_DYN_VALUE ];
|
|
4746
|
+
if (values[_DYN_LENGTH$2 ] > 1) {
|
|
4747
|
+
var endpointRes = values[1];
|
|
4748
|
+
_endpoint = endpointRes && endpointRes[_DYN_VALUE ];
|
|
4749
|
+
}
|
|
4750
|
+
}
|
|
4751
|
+
if (_instrumentationKey) {
|
|
4752
|
+
config[_DYN_INSTRUMENTATION_KEY$2 ] = _instrumentationKey;
|
|
4753
|
+
config.endpointUrl = _endpoint;
|
|
4754
|
+
}
|
|
4755
|
+
}
|
|
4756
|
+
_setStatus();
|
|
4757
|
+
}
|
|
4758
|
+
catch (e) {
|
|
4759
|
+
if (!_isStatusSet) {
|
|
4760
|
+
_setStatus();
|
|
4761
|
+
}
|
|
4762
|
+
}
|
|
4763
|
+
});
|
|
4764
|
+
}
|
|
4765
|
+
else {
|
|
4766
|
+
_setStatus();
|
|
4767
|
+
}
|
|
4610
4768
|
var extCfg = details.ref(details.cfg, STR_EXTENSION_CONFIG);
|
|
4611
4769
|
objForEachKey(extCfg, function (key) {
|
|
4612
4770
|
details.ref(extCfg, key);
|
|
4613
4771
|
});
|
|
4614
|
-
if (isNullOrUndefined(_instrumentationKey)) {
|
|
4615
|
-
throwError("Please provide instrumentation key");
|
|
4616
|
-
}
|
|
4617
4772
|
}));
|
|
4618
4773
|
_notificationManager = notificationManager;
|
|
4619
4774
|
_debugListener = _initDebugListener(_configHandler, _hookContainer, _notificationManager && _self[_DYN_GET_NOTIFY_MGR ](), _debugListener);
|
|
@@ -4636,8 +4791,9 @@ var AppInsightsCore = /** @class */ (function () {
|
|
|
4636
4791
|
_registerDelayedCfgListener(config, _cfgListeners, _logger);
|
|
4637
4792
|
_cfgListeners = null;
|
|
4638
4793
|
_isInitialized = true;
|
|
4639
|
-
|
|
4640
|
-
|
|
4794
|
+
if (_activeStatus === ActiveStatus.ACTIVE) {
|
|
4795
|
+
_releaseQueues();
|
|
4796
|
+
}
|
|
4641
4797
|
};
|
|
4642
4798
|
_self.getChannels = function () {
|
|
4643
4799
|
var controls = [];
|
|
@@ -4658,14 +4814,16 @@ var AppInsightsCore = /** @class */ (function () {
|
|
|
4658
4814
|
_notifyInvalidEvent(telemetryItem);
|
|
4659
4815
|
throwError("telemetry name required");
|
|
4660
4816
|
}
|
|
4661
|
-
telemetryItem
|
|
4817
|
+
telemetryItem[_DYN_I_KEY ] = telemetryItem[_DYN_I_KEY ] || _instrumentationKey;
|
|
4662
4818
|
telemetryItem[_DYN_TIME ] = telemetryItem[_DYN_TIME ] || toISOString(new Date());
|
|
4663
4819
|
telemetryItem.ver = telemetryItem.ver || "4.0";
|
|
4664
|
-
if (!_isUnloading && _self[_DYN_IS_INITIALIZED ]()) {
|
|
4820
|
+
if (!_isUnloading && _self[_DYN_IS_INITIALIZED ]() && _activeStatus === ActiveStatus.ACTIVE) {
|
|
4665
4821
|
_createTelCtx()[_DYN_PROCESS_NEXT ](telemetryItem);
|
|
4666
4822
|
}
|
|
4667
|
-
else {
|
|
4668
|
-
_eventQueue[
|
|
4823
|
+
else if (_activeStatus !== ActiveStatus[_DYN__INACTIVE ]) {
|
|
4824
|
+
if (_eventQueue[_DYN_LENGTH$2 ] <= _initInMemoMaxSize) {
|
|
4825
|
+
_eventQueue[_DYN_PUSH$2 ](telemetryItem);
|
|
4826
|
+
}
|
|
4669
4827
|
}
|
|
4670
4828
|
}, function () { return ({ item: telemetryItem }); }, !(telemetryItem.sync));
|
|
4671
4829
|
};
|
|
@@ -4710,9 +4868,15 @@ var AppInsightsCore = /** @class */ (function () {
|
|
|
4710
4868
|
if (_isInitialized && _eventQueue[_DYN_LENGTH$2 ] > 0) {
|
|
4711
4869
|
var eventQueue = _eventQueue;
|
|
4712
4870
|
_eventQueue = [];
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4871
|
+
if (_activeStatus === 2 ) {
|
|
4872
|
+
arrForEach(eventQueue, function (event) {
|
|
4873
|
+
event[_DYN_I_KEY ] = event[_DYN_I_KEY ] || _instrumentationKey;
|
|
4874
|
+
_createTelCtx()[_DYN_PROCESS_NEXT ](event);
|
|
4875
|
+
});
|
|
4876
|
+
}
|
|
4877
|
+
else {
|
|
4878
|
+
_throwInternal(_logger, 2 , 20 , "core init status is not active");
|
|
4879
|
+
}
|
|
4716
4880
|
}
|
|
4717
4881
|
};
|
|
4718
4882
|
_self[_DYN_POLL_INTERNAL_LOGS ] = function (eventName) {
|
|
@@ -4721,6 +4885,23 @@ var AppInsightsCore = /** @class */ (function () {
|
|
|
4721
4885
|
_internalLogPoller && _internalLogPoller[_DYN_CANCEL ]();
|
|
4722
4886
|
return _startLogPoller(true);
|
|
4723
4887
|
};
|
|
4888
|
+
function _setStatus() {
|
|
4889
|
+
_isStatusSet = true;
|
|
4890
|
+
if (isNullOrUndefined(_instrumentationKey)) {
|
|
4891
|
+
_activeStatus = ActiveStatus[_DYN__INACTIVE ];
|
|
4892
|
+
_throwInternal(_logger, 1 , 112 , "ikey can't be resolved from promises");
|
|
4893
|
+
}
|
|
4894
|
+
else {
|
|
4895
|
+
_activeStatus = ActiveStatus.ACTIVE;
|
|
4896
|
+
}
|
|
4897
|
+
_releaseQueues();
|
|
4898
|
+
}
|
|
4899
|
+
function _releaseQueues() {
|
|
4900
|
+
if (_isInitialized) {
|
|
4901
|
+
_self.releaseQueue();
|
|
4902
|
+
_self[_DYN_POLL_INTERNAL_LOGS ]();
|
|
4903
|
+
}
|
|
4904
|
+
}
|
|
4724
4905
|
function _startLogPoller(alwaysStart) {
|
|
4725
4906
|
if ((!_internalLogPoller || !_internalLogPoller[_DYN_ENABLED ]) && !_forceStopInternalLogPoller) {
|
|
4726
4907
|
var shouldStart = alwaysStart || (_logger && _logger.queue[_DYN_LENGTH$2 ] > 0);
|
|
@@ -4994,6 +5175,10 @@ var AppInsightsCore = /** @class */ (function () {
|
|
|
4994
5175
|
_forceStopInternalLogPoller = false;
|
|
4995
5176
|
_internalLogPoller = null;
|
|
4996
5177
|
_internalLogPollerListening = false;
|
|
5178
|
+
_activeStatus = 0 ;
|
|
5179
|
+
_endpoint = null;
|
|
5180
|
+
_initInMemoMaxSize = null;
|
|
5181
|
+
_isStatusSet = false;
|
|
4997
5182
|
}
|
|
4998
5183
|
function _createTelCtx() {
|
|
4999
5184
|
var theCtx = createProcessTelemetryContext(_getPluginChain(), _configHandler.cfg, _self);
|
|
@@ -5136,7 +5321,7 @@ var AppInsightsCore = /** @class */ (function () {
|
|
|
5136
5321
|
var _a;
|
|
5137
5322
|
var item = (_a = {},
|
|
5138
5323
|
_a[_DYN_NAME$2 ] = _internalLogsEventName ? _internalLogsEventName : "InternalMessageId: " + logMessage[_DYN_MESSAGE_ID ],
|
|
5139
|
-
_a
|
|
5324
|
+
_a[_DYN_I_KEY ] = _instrumentationKey,
|
|
5140
5325
|
_a[_DYN_TIME ] = toISOString(new Date()),
|
|
5141
5326
|
_a.baseType = _InternalLogMessage.dataType,
|
|
5142
5327
|
_a.baseData = { message: logMessage[_DYN_MESSAGE$1 ] },
|
|
@@ -5572,7 +5757,7 @@ var SenderPostManager = /** @class */ (function () {
|
|
|
5572
5757
|
if (!responseHandled) {
|
|
5573
5758
|
responseHandled = true;
|
|
5574
5759
|
if (!result.rejected) {
|
|
5575
|
-
var response_1 = result
|
|
5760
|
+
var response_1 = result[_DYN_VALUE ];
|
|
5576
5761
|
try {
|
|
5577
5762
|
if (!_isOneDs && !response_1.ok) {
|
|
5578
5763
|
_handleError(response_1.statusText);
|
|
@@ -5585,7 +5770,7 @@ var SenderPostManager = /** @class */ (function () {
|
|
|
5585
5770
|
}
|
|
5586
5771
|
else {
|
|
5587
5772
|
doAwaitResponse(response_1.text(), function (resp) {
|
|
5588
|
-
_onFetchComplete(response_1, payload, resp
|
|
5773
|
+
_onFetchComplete(response_1, payload, resp[_DYN_VALUE ]);
|
|
5589
5774
|
resolveFunc && resolveFunc(true);
|
|
5590
5775
|
});
|
|
5591
5776
|
}
|
|
@@ -5891,7 +6076,7 @@ var RequestHeaders = createValueMap({
|
|
|
5891
6076
|
var _DYN_SPLIT = "split";
|
|
5892
6077
|
var _DYN_LENGTH$1 = "length";
|
|
5893
6078
|
var _DYN_TO_LOWER_CASE = "toLowerCase";
|
|
5894
|
-
var _DYN_INGESTIONENDPOINT = "ingestionendpoint";
|
|
6079
|
+
var _DYN_INGESTIONENDPOINT$1 = "ingestionendpoint";
|
|
5895
6080
|
var _DYN_TO_STRING$1 = "toString";
|
|
5896
6081
|
var _DYN_PUSH$1 = "push";
|
|
5897
6082
|
var _DYN_REMOVE_ITEM = "removeItem";
|
|
@@ -6224,11 +6409,11 @@ function parseConnectionString(connectionString) {
|
|
|
6224
6409
|
if (objKeys(result)[_DYN_LENGTH$1 ] > 0) {
|
|
6225
6410
|
if (result.endpointsuffix) {
|
|
6226
6411
|
var locationPrefix = result.location ? result.location + "." : "";
|
|
6227
|
-
result[_DYN_INGESTIONENDPOINT ] = result[_DYN_INGESTIONENDPOINT ] || ("https://" + locationPrefix + "dc." + result.endpointsuffix);
|
|
6412
|
+
result[_DYN_INGESTIONENDPOINT$1 ] = result[_DYN_INGESTIONENDPOINT$1 ] || ("https://" + locationPrefix + "dc." + result.endpointsuffix);
|
|
6228
6413
|
}
|
|
6229
|
-
result[_DYN_INGESTIONENDPOINT ] = result[_DYN_INGESTIONENDPOINT ] || DEFAULT_BREEZE_ENDPOINT;
|
|
6230
|
-
if (strEndsWith(result[_DYN_INGESTIONENDPOINT ], "/")) {
|
|
6231
|
-
result[_DYN_INGESTIONENDPOINT ] = result[_DYN_INGESTIONENDPOINT ].slice(0, -1);
|
|
6414
|
+
result[_DYN_INGESTIONENDPOINT$1 ] = result[_DYN_INGESTIONENDPOINT$1 ] || DEFAULT_BREEZE_ENDPOINT;
|
|
6415
|
+
if (strEndsWith(result[_DYN_INGESTIONENDPOINT$1 ], "/")) {
|
|
6416
|
+
result[_DYN_INGESTIONENDPOINT$1 ] = result[_DYN_INGESTIONENDPOINT$1 ].slice(0, -1);
|
|
6232
6417
|
}
|
|
6233
6418
|
}
|
|
6234
6419
|
return result;
|
|
@@ -7335,7 +7520,7 @@ function EnvelopeCreatorInit(logger, telemetryItem) {
|
|
|
7335
7520
|
}
|
|
7336
7521
|
}
|
|
7337
7522
|
var EnvelopeCreator = {
|
|
7338
|
-
Version: '3.3.0-nightly3.2406-
|
|
7523
|
+
Version: '3.3.0-nightly3.2406-09'
|
|
7339
7524
|
};
|
|
7340
7525
|
function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
|
|
7341
7526
|
EnvelopeCreatorInit(logger, telemetryItem);
|
|
@@ -8137,6 +8322,12 @@ var Sender = /** @class */ (function (_super) {
|
|
|
8137
8322
|
return senderConfig;
|
|
8138
8323
|
}
|
|
8139
8324
|
});
|
|
8325
|
+
if (core.activeStatus() === ActiveStatus.PENDING) {
|
|
8326
|
+
_self.pause();
|
|
8327
|
+
}
|
|
8328
|
+
else if (core.activeStatus() === ActiveStatus.ACTIVE) {
|
|
8329
|
+
_self.resume();
|
|
8330
|
+
}
|
|
8140
8331
|
if (_orgEndpointUrl !== senderConfig.endpointUrl) {
|
|
8141
8332
|
_endpointUrl = _orgEndpointUrl = senderConfig.endpointUrl;
|
|
8142
8333
|
}
|
|
@@ -8185,7 +8376,7 @@ var Sender = /** @class */ (function (_super) {
|
|
|
8185
8376
|
_throwInternal(diagLog, 1 , 100 , "Invalid Instrumentation key " + _instrumentationKey);
|
|
8186
8377
|
}
|
|
8187
8378
|
_customHeaders = senderConfig[_DYN_CUSTOM_HEADERS ];
|
|
8188
|
-
if (!isInternalApplicationInsightsEndpoint(_endpointUrl) && _customHeaders && _customHeaders[_DYN_LENGTH ] > 0) {
|
|
8379
|
+
if (isString(_endpointUrl) && !isInternalApplicationInsightsEndpoint(_endpointUrl) && _customHeaders && _customHeaders[_DYN_LENGTH ] > 0) {
|
|
8189
8380
|
arrForEach(_customHeaders, function (customHeader) {
|
|
8190
8381
|
_this.addHeader(customHeader.header, customHeader.value);
|
|
8191
8382
|
});
|
|
@@ -8900,8 +9091,10 @@ var Sender = /** @class */ (function (_super) {
|
|
|
8900
9091
|
|
|
8901
9092
|
var _DYN_INSTRUMENTATION_KEY = "instrumentationKey";
|
|
8902
9093
|
var _DYN_CONNECTION_STRING = "connectionString";
|
|
9094
|
+
var _DYN_INSTRUMENTATIONKEY0 = "instrumentationkey";
|
|
8903
9095
|
var _DYN_ENDPOINT_URL = "endpointUrl";
|
|
8904
|
-
var
|
|
9096
|
+
var _DYN_INGESTIONENDPOINT = "ingestionendpoint";
|
|
9097
|
+
var _DYN_USER_OVERRIDE_ENDPOI1 = "userOverrideEndpointUrl";
|
|
8905
9098
|
|
|
8906
9099
|
var defaultConfigValues = {
|
|
8907
9100
|
diagnosticLogInterval: cfgDfValidate(_chkDiagLevel, 10000)
|
|
@@ -8939,13 +9132,42 @@ var ApplicationInsights = /** @class */ (function () {
|
|
|
8939
9132
|
var cfgHandler = createDynamicConfig(config || {}, defaultConfigValues);
|
|
8940
9133
|
_config = cfgHandler.cfg;
|
|
8941
9134
|
core.addUnloadHook(onConfigChange(cfgHandler, function () {
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
var
|
|
8945
|
-
|
|
8946
|
-
|
|
9135
|
+
var configCs = _config[_DYN_CONNECTION_STRING ];
|
|
9136
|
+
if (isPromiseLike(configCs)) {
|
|
9137
|
+
var ikeyPromise = createAsyncPromise(function (resolve, reject) {
|
|
9138
|
+
doAwaitResponse(configCs, function (res) {
|
|
9139
|
+
var curCs = res.value;
|
|
9140
|
+
var ikey = _config[_DYN_INSTRUMENTATION_KEY ];
|
|
9141
|
+
if (!res.rejected && curCs) {
|
|
9142
|
+
_config[_DYN_CONNECTION_STRING ] = curCs;
|
|
9143
|
+
var resolvedCs = parseConnectionString(curCs);
|
|
9144
|
+
ikey = resolvedCs[_DYN_INSTRUMENTATIONKEY0 ] || ikey;
|
|
9145
|
+
}
|
|
9146
|
+
resolve(ikey);
|
|
9147
|
+
});
|
|
9148
|
+
});
|
|
9149
|
+
var urlPromise = createAsyncPromise(function (resolve, reject) {
|
|
9150
|
+
doAwaitResponse(configCs, function (res) {
|
|
9151
|
+
var curCs = res.value;
|
|
9152
|
+
var url = _config[_DYN_ENDPOINT_URL ];
|
|
9153
|
+
if (!res.rejected && curCs) {
|
|
9154
|
+
var resolvedCs = parseConnectionString(curCs);
|
|
9155
|
+
var ingest = resolvedCs[_DYN_INGESTIONENDPOINT ];
|
|
9156
|
+
url = ingest ? ingest + DEFAULT_BREEZE_PATH : url;
|
|
9157
|
+
}
|
|
9158
|
+
resolve(url);
|
|
9159
|
+
});
|
|
9160
|
+
});
|
|
9161
|
+
_config[_DYN_INSTRUMENTATION_KEY ] = ikeyPromise;
|
|
9162
|
+
_config[_DYN_ENDPOINT_URL ] = _config[_DYN_USER_OVERRIDE_ENDPOI1 ] || urlPromise;
|
|
9163
|
+
}
|
|
9164
|
+
if (isString(configCs)) {
|
|
9165
|
+
var cs = parseConnectionString(configCs);
|
|
9166
|
+
var ingest = cs[_DYN_INGESTIONENDPOINT ];
|
|
9167
|
+
_config[_DYN_ENDPOINT_URL ] = _config[_DYN_USER_OVERRIDE_ENDPOI1 ] ? _config[_DYN_USER_OVERRIDE_ENDPOI1 ] : (ingest + DEFAULT_BREEZE_PATH);
|
|
9168
|
+
_config[_DYN_INSTRUMENTATION_KEY ] = cs[_DYN_INSTRUMENTATIONKEY0 ] || _config[_DYN_INSTRUMENTATION_KEY ];
|
|
8947
9169
|
}
|
|
8948
|
-
_config[_DYN_ENDPOINT_URL ] = _config[
|
|
9170
|
+
_config[_DYN_ENDPOINT_URL ] = _config[_DYN_USER_OVERRIDE_ENDPOI1 ] ? _config[_DYN_USER_OVERRIDE_ENDPOI1 ] : _config[_DYN_ENDPOINT_URL ];
|
|
8949
9171
|
}));
|
|
8950
9172
|
core.initialize(_config, [new Sender()]);
|
|
8951
9173
|
}
|
|
@@ -8972,4 +9194,4 @@ exports.proxyFunctions = proxyFunctions;
|
|
|
8972
9194
|
exports.throwError = throwError;
|
|
8973
9195
|
|
|
8974
9196
|
}));
|
|
8975
|
-
//# sourceMappingURL=aib.3.3.0-nightly3.2406-
|
|
9197
|
+
//# sourceMappingURL=aib.3.3.0-nightly3.2406-09.js.map
|