@microsoft/applicationinsights-channel-js 2.8.0-nightly.2204-17 → 2.8.0
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-channel-js.integrity.json +9 -9
- package/browser/applicationinsights-channel-js.js +24 -108
- package/browser/applicationinsights-channel-js.js.map +1 -1
- package/browser/applicationinsights-channel-js.min.js +2 -2
- package/browser/applicationinsights-channel-js.min.js.map +1 -1
- package/dist/applicationinsights-channel-js.api.json +5 -4
- package/dist/applicationinsights-channel-js.d.ts +1 -1
- package/dist/applicationinsights-channel-js.js +24 -108
- package/dist/applicationinsights-channel-js.js.map +1 -1
- package/dist/applicationinsights-channel-js.min.js +2 -2
- package/dist/applicationinsights-channel-js.min.js.map +1 -1
- package/dist/applicationinsights-channel-js.rollup.d.ts +1 -1
- package/dist-esm/EnvelopeCreator.js +2 -2
- package/dist-esm/EnvelopeCreator.js.map +1 -1
- package/dist-esm/Interfaces.js +1 -1
- package/dist-esm/Offline.js +1 -1
- package/dist-esm/SendBuffer.js +1 -1
- package/dist-esm/Sender.js +1 -1
- package/dist-esm/Serializer.js +1 -1
- package/dist-esm/TelemetryProcessors/Sample.js +4 -4
- package/dist-esm/TelemetryProcessors/Sample.js.map +1 -1
- package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +1 -1
- package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +1 -1
- package/dist-esm/applicationinsights-channel-js.js +1 -1
- package/package.json +54 -57
- package/src/EnvelopeCreator.ts +1 -1
- package/src/TelemetryProcessors/Sample.ts +6 -4
- package/types/TelemetryProcessors/Sample.d.ts +1 -1
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
-
"toolVersion": "7.
|
|
4
|
+
"toolVersion": "7.22.2",
|
|
5
5
|
"schemaVersion": 1005,
|
|
6
6
|
"oldestForwardsCompatibleVersion": 1001,
|
|
7
7
|
"tsdocConfig": {
|
|
@@ -156,7 +156,8 @@
|
|
|
156
156
|
"@betaDocumentation": true,
|
|
157
157
|
"@internalRemarks": true,
|
|
158
158
|
"@preapproved": true
|
|
159
|
-
}
|
|
159
|
+
},
|
|
160
|
+
"reportUnsupportedHtmlElements": false
|
|
160
161
|
}
|
|
161
162
|
},
|
|
162
163
|
"kind": "Package",
|
|
@@ -1290,12 +1291,12 @@
|
|
|
1290
1291
|
],
|
|
1291
1292
|
"extendsTokenRange": {
|
|
1292
1293
|
"startIndex": 1,
|
|
1293
|
-
"endIndex":
|
|
1294
|
+
"endIndex": 2
|
|
1294
1295
|
},
|
|
1295
1296
|
"implementsTokenRanges": [
|
|
1296
1297
|
{
|
|
1297
1298
|
"startIndex": 4,
|
|
1298
|
-
"endIndex":
|
|
1299
|
+
"endIndex": 5
|
|
1299
1300
|
}
|
|
1300
1301
|
]
|
|
1301
1302
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Channel, 2.8.0
|
|
2
|
+
* Application Insights JavaScript SDK - Channel, 2.8.0
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -1273,7 +1273,7 @@
|
|
|
1273
1273
|
}
|
|
1274
1274
|
|
|
1275
1275
|
var _objDefineProperty = ObjDefineProperty;
|
|
1276
|
-
var version = "2.8.0
|
|
1276
|
+
var version = "2.8.0";
|
|
1277
1277
|
var instanceName = "." + newId(6);
|
|
1278
1278
|
var _dataUid = 0;
|
|
1279
1279
|
function _createAccessor(target, prop, value) {
|
|
@@ -1353,20 +1353,20 @@
|
|
|
1353
1353
|
var strHasRunFlags = "_hasRun";
|
|
1354
1354
|
var strGetTelCtx = "_getTelCtx";
|
|
1355
1355
|
var _chainId = 0;
|
|
1356
|
-
function _getNextProxyStart(proxy,
|
|
1356
|
+
function _getNextProxyStart(proxy, core, startAt) {
|
|
1357
1357
|
while (proxy) {
|
|
1358
1358
|
if (proxy.getPlugin() === startAt) {
|
|
1359
1359
|
return proxy;
|
|
1360
1360
|
}
|
|
1361
1361
|
proxy = proxy.getNext();
|
|
1362
1362
|
}
|
|
1363
|
-
return createTelemetryProxyChain([startAt], config, core);
|
|
1363
|
+
return createTelemetryProxyChain([startAt], core.config || {}, core);
|
|
1364
1364
|
}
|
|
1365
1365
|
function _createInternalContext(telemetryChain, config, core, startAt) {
|
|
1366
1366
|
var _nextProxy = null;
|
|
1367
1367
|
var _onComplete = [];
|
|
1368
1368
|
if (startAt !== null) {
|
|
1369
|
-
_nextProxy = startAt ? _getNextProxyStart(telemetryChain,
|
|
1369
|
+
_nextProxy = startAt ? _getNextProxyStart(telemetryChain, core, startAt) : telemetryChain;
|
|
1370
1370
|
}
|
|
1371
1371
|
var context = {
|
|
1372
1372
|
_next: _moveNext,
|
|
@@ -1453,6 +1453,7 @@
|
|
|
1453
1453
|
}
|
|
1454
1454
|
});
|
|
1455
1455
|
}
|
|
1456
|
+
theConfig = newConfig_1;
|
|
1456
1457
|
}
|
|
1457
1458
|
}
|
|
1458
1459
|
return theConfig;
|
|
@@ -1499,7 +1500,8 @@
|
|
|
1499
1500
|
context.createNew = _createNew;
|
|
1500
1501
|
return context;
|
|
1501
1502
|
}
|
|
1502
|
-
function createProcessTelemetryUnloadContext(telemetryChain,
|
|
1503
|
+
function createProcessTelemetryUnloadContext(telemetryChain, core, startAt) {
|
|
1504
|
+
var config = core.config || {};
|
|
1503
1505
|
var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
|
|
1504
1506
|
var context = internalContext.ctx;
|
|
1505
1507
|
function _processNext(unloadState) {
|
|
@@ -1512,19 +1514,20 @@
|
|
|
1512
1514
|
if (isArray(plugins)) {
|
|
1513
1515
|
plugins = createTelemetryProxyChain(plugins, config, core, startAt);
|
|
1514
1516
|
}
|
|
1515
|
-
return createProcessTelemetryUnloadContext(plugins || context.getNext(),
|
|
1517
|
+
return createProcessTelemetryUnloadContext(plugins || context.getNext(), core, startAt);
|
|
1516
1518
|
}
|
|
1517
1519
|
context.processNext = _processNext;
|
|
1518
1520
|
context.createNew = _createNew;
|
|
1519
1521
|
return context;
|
|
1520
1522
|
}
|
|
1521
|
-
function createProcessTelemetryUpdateContext(telemetryChain,
|
|
1523
|
+
function createProcessTelemetryUpdateContext(telemetryChain, core, startAt) {
|
|
1524
|
+
var config = core.config || {};
|
|
1522
1525
|
var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
|
|
1523
1526
|
var context = internalContext.ctx;
|
|
1524
1527
|
function _processNext(updateState) {
|
|
1525
1528
|
return context.iterate(function (plugin) {
|
|
1526
|
-
if (isFunction(plugin
|
|
1527
|
-
plugin
|
|
1529
|
+
if (isFunction(plugin.update)) {
|
|
1530
|
+
plugin.update(context, updateState);
|
|
1528
1531
|
}
|
|
1529
1532
|
});
|
|
1530
1533
|
}
|
|
@@ -1533,7 +1536,7 @@
|
|
|
1533
1536
|
if (isArray(plugins)) {
|
|
1534
1537
|
plugins = createTelemetryProxyChain(plugins, config, core, startAt);
|
|
1535
1538
|
}
|
|
1536
|
-
return createProcessTelemetryUpdateContext(plugins || context.getNext(),
|
|
1539
|
+
return createProcessTelemetryUpdateContext(plugins || context.getNext(), core, startAt);
|
|
1537
1540
|
}
|
|
1538
1541
|
context.processNext = _processNext;
|
|
1539
1542
|
context.createNew = _createNew;
|
|
@@ -1625,7 +1628,7 @@
|
|
|
1625
1628
|
hasRun = true;
|
|
1626
1629
|
}
|
|
1627
1630
|
if (!nextProxy || !hasNextRun) {
|
|
1628
|
-
_throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" +
|
|
1631
|
+
_throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" + identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
|
|
1629
1632
|
}
|
|
1630
1633
|
}
|
|
1631
1634
|
}, details, isAsync);
|
|
@@ -1639,7 +1642,7 @@
|
|
|
1639
1642
|
return false;
|
|
1640
1643
|
}
|
|
1641
1644
|
var pluginState = _getPluginState(plugin);
|
|
1642
|
-
if (pluginState
|
|
1645
|
+
if (pluginState.teardown || pluginState[strDisabled]) {
|
|
1643
1646
|
return false;
|
|
1644
1647
|
}
|
|
1645
1648
|
if (hasSetNext) {
|
|
@@ -1736,12 +1739,13 @@
|
|
|
1736
1739
|
_isinitialized = true;
|
|
1737
1740
|
};
|
|
1738
1741
|
_self.teardown = function (unloadCtx, unloadState) {
|
|
1739
|
-
|
|
1742
|
+
var core = _self.core;
|
|
1743
|
+
if (!core || (unloadCtx && core !== unloadCtx.core())) {
|
|
1740
1744
|
return;
|
|
1741
1745
|
}
|
|
1742
1746
|
var result;
|
|
1743
1747
|
var unloadDone = false;
|
|
1744
|
-
var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null,
|
|
1748
|
+
var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
|
|
1745
1749
|
var theUnloadState = unloadState || {
|
|
1746
1750
|
reason: 0 ,
|
|
1747
1751
|
isAsync: false
|
|
@@ -1769,12 +1773,13 @@
|
|
|
1769
1773
|
return result;
|
|
1770
1774
|
};
|
|
1771
1775
|
_self.update = function (updateCtx, updateState) {
|
|
1772
|
-
|
|
1776
|
+
var core = _self.core;
|
|
1777
|
+
if (!core || (updateCtx && core !== updateCtx.core())) {
|
|
1773
1778
|
return;
|
|
1774
1779
|
}
|
|
1775
1780
|
var result;
|
|
1776
1781
|
var updateDone = false;
|
|
1777
|
-
var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null,
|
|
1782
|
+
var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
|
|
1778
1783
|
var theUpdateState = updateState || {
|
|
1779
1784
|
reason: 0
|
|
1780
1785
|
};
|
|
@@ -2036,95 +2041,6 @@
|
|
|
2036
2041
|
}
|
|
2037
2042
|
}
|
|
2038
2043
|
|
|
2039
|
-
var LoggingSeverity = createEnumStyle({
|
|
2040
|
-
CRITICAL: 1 ,
|
|
2041
|
-
WARNING: 2
|
|
2042
|
-
});
|
|
2043
|
-
var _InternalMessageId = createEnumStyle({
|
|
2044
|
-
BrowserDoesNotSupportLocalStorage: 0 ,
|
|
2045
|
-
BrowserCannotReadLocalStorage: 1 ,
|
|
2046
|
-
BrowserCannotReadSessionStorage: 2 ,
|
|
2047
|
-
BrowserCannotWriteLocalStorage: 3 ,
|
|
2048
|
-
BrowserCannotWriteSessionStorage: 4 ,
|
|
2049
|
-
BrowserFailedRemovalFromLocalStorage: 5 ,
|
|
2050
|
-
BrowserFailedRemovalFromSessionStorage: 6 ,
|
|
2051
|
-
CannotSendEmptyTelemetry: 7 ,
|
|
2052
|
-
ClientPerformanceMathError: 8 ,
|
|
2053
|
-
ErrorParsingAISessionCookie: 9 ,
|
|
2054
|
-
ErrorPVCalc: 10 ,
|
|
2055
|
-
ExceptionWhileLoggingError: 11 ,
|
|
2056
|
-
FailedAddingTelemetryToBuffer: 12 ,
|
|
2057
|
-
FailedMonitorAjaxAbort: 13 ,
|
|
2058
|
-
FailedMonitorAjaxDur: 14 ,
|
|
2059
|
-
FailedMonitorAjaxOpen: 15 ,
|
|
2060
|
-
FailedMonitorAjaxRSC: 16 ,
|
|
2061
|
-
FailedMonitorAjaxSend: 17 ,
|
|
2062
|
-
FailedMonitorAjaxGetCorrelationHeader: 18 ,
|
|
2063
|
-
FailedToAddHandlerForOnBeforeUnload: 19 ,
|
|
2064
|
-
FailedToSendQueuedTelemetry: 20 ,
|
|
2065
|
-
FailedToReportDataLoss: 21 ,
|
|
2066
|
-
FlushFailed: 22 ,
|
|
2067
|
-
MessageLimitPerPVExceeded: 23 ,
|
|
2068
|
-
MissingRequiredFieldSpecification: 24 ,
|
|
2069
|
-
NavigationTimingNotSupported: 25 ,
|
|
2070
|
-
OnError: 26 ,
|
|
2071
|
-
SessionRenewalDateIsZero: 27 ,
|
|
2072
|
-
SenderNotInitialized: 28 ,
|
|
2073
|
-
StartTrackEventFailed: 29 ,
|
|
2074
|
-
StopTrackEventFailed: 30 ,
|
|
2075
|
-
StartTrackFailed: 31 ,
|
|
2076
|
-
StopTrackFailed: 32 ,
|
|
2077
|
-
TelemetrySampledAndNotSent: 33 ,
|
|
2078
|
-
TrackEventFailed: 34 ,
|
|
2079
|
-
TrackExceptionFailed: 35 ,
|
|
2080
|
-
TrackMetricFailed: 36 ,
|
|
2081
|
-
TrackPVFailed: 37 ,
|
|
2082
|
-
TrackPVFailedCalc: 38 ,
|
|
2083
|
-
TrackTraceFailed: 39 ,
|
|
2084
|
-
TransmissionFailed: 40 ,
|
|
2085
|
-
FailedToSetStorageBuffer: 41 ,
|
|
2086
|
-
FailedToRestoreStorageBuffer: 42 ,
|
|
2087
|
-
InvalidBackendResponse: 43 ,
|
|
2088
|
-
FailedToFixDepricatedValues: 44 ,
|
|
2089
|
-
InvalidDurationValue: 45 ,
|
|
2090
|
-
TelemetryEnvelopeInvalid: 46 ,
|
|
2091
|
-
CreateEnvelopeError: 47 ,
|
|
2092
|
-
CannotSerializeObject: 48 ,
|
|
2093
|
-
CannotSerializeObjectNonSerializable: 49 ,
|
|
2094
|
-
CircularReferenceDetected: 50 ,
|
|
2095
|
-
ClearAuthContextFailed: 51 ,
|
|
2096
|
-
ExceptionTruncated: 52 ,
|
|
2097
|
-
IllegalCharsInName: 53 ,
|
|
2098
|
-
ItemNotInArray: 54 ,
|
|
2099
|
-
MaxAjaxPerPVExceeded: 55 ,
|
|
2100
|
-
MessageTruncated: 56 ,
|
|
2101
|
-
NameTooLong: 57 ,
|
|
2102
|
-
SampleRateOutOfRange: 58 ,
|
|
2103
|
-
SetAuthContextFailed: 59 ,
|
|
2104
|
-
SetAuthContextFailedAccountName: 60 ,
|
|
2105
|
-
StringValueTooLong: 61 ,
|
|
2106
|
-
StartCalledMoreThanOnce: 62 ,
|
|
2107
|
-
StopCalledWithoutStart: 63 ,
|
|
2108
|
-
TelemetryInitializerFailed: 64 ,
|
|
2109
|
-
TrackArgumentsNotSpecified: 65 ,
|
|
2110
|
-
UrlTooLong: 66 ,
|
|
2111
|
-
SessionStorageBufferFull: 67 ,
|
|
2112
|
-
CannotAccessCookie: 68 ,
|
|
2113
|
-
IdTooLong: 69 ,
|
|
2114
|
-
InvalidEvent: 70 ,
|
|
2115
|
-
FailedMonitorAjaxSetRequestHeader: 71 ,
|
|
2116
|
-
SendBrowserInfoOnUserInit: 72 ,
|
|
2117
|
-
PluginException: 73 ,
|
|
2118
|
-
NotificationException: 74 ,
|
|
2119
|
-
SnippetScriptLoadFailure: 99 ,
|
|
2120
|
-
InvalidInstrumentationKey: 100 ,
|
|
2121
|
-
CannotParseAiBlobValue: 101 ,
|
|
2122
|
-
InvalidContentBlob: 102 ,
|
|
2123
|
-
TrackPageActionEventFailed: 103 ,
|
|
2124
|
-
FailedAddingCustomDefinedRequestContext: 104 ,
|
|
2125
|
-
InMemoryStorageBufferFull: 105
|
|
2126
|
-
});
|
|
2127
|
-
|
|
2128
2044
|
var RequestHeaders = createValueMap({
|
|
2129
2045
|
requestContextHeader: [0 , "Request-Context"],
|
|
2130
2046
|
requestContextTargetKey: [1 , "appId"],
|
|
@@ -3478,7 +3394,7 @@
|
|
|
3478
3394
|
}
|
|
3479
3395
|
}
|
|
3480
3396
|
var EnvelopeCreator = {
|
|
3481
|
-
Version: "2.8.0
|
|
3397
|
+
Version: "2.8.0"
|
|
3482
3398
|
};
|
|
3483
3399
|
function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
|
|
3484
3400
|
EnvelopeCreatorInit(logger, telemetryItem);
|
|
@@ -3908,7 +3824,7 @@
|
|
|
3908
3824
|
this.INT_MAX_VALUE = 2147483647;
|
|
3909
3825
|
var _logger = logger || safeGetLogger(null);
|
|
3910
3826
|
if (sampleRate > 100 || sampleRate < 0) {
|
|
3911
|
-
_logger.throwInternal(
|
|
3827
|
+
_logger.throwInternal(2 , 58 , "Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.", { samplingRate: sampleRate }, true);
|
|
3912
3828
|
sampleRate = 100;
|
|
3913
3829
|
}
|
|
3914
3830
|
this.sampleRate = sampleRate;
|