@microsoft/applicationinsights-channel-js 2.7.3-nightly.2112-08 → 2.7.4-nightly.2201-03
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 +83 -53
- 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 +1 -1
- package/dist/applicationinsights-channel-js.d.ts +1 -1
- package/dist/applicationinsights-channel-js.js +83 -53
- 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 +50 -27
- package/dist-esm/Sender.js.map +1 -1
- package/dist-esm/Serializer.js +1 -1
- package/dist-esm/TelemetryProcessors/Sample.js +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 +4 -4
- package/src/EnvelopeCreator.ts +2 -2
- package/src/Offline.ts +1 -1
- package/src/SendBuffer.ts +1 -1
- package/src/Sender.ts +52 -28
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights JavaScript SDK Channel, 2.7.
|
|
2
|
+
* Microsoft Application Insights JavaScript SDK Channel, 2.7.4-nightly.2201-03
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Channel, 2.7.
|
|
2
|
+
* Application Insights JavaScript SDK - Channel, 2.7.4-nightly.2201-03
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -20,20 +20,24 @@
|
|
|
20
20
|
var ObjDefineProperty = ObjClass["defineProperty"];
|
|
21
21
|
var ObjHasOwnProperty = ObjProto[strShimHasOwnProperty];
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
var _cachedGlobal = null;
|
|
24
|
+
function getGlobal(useCached) {
|
|
25
|
+
if (useCached === void 0) { useCached = true; }
|
|
26
|
+
if (!_cachedGlobal || !useCached) {
|
|
27
|
+
if (typeof globalThis !== strShimUndefined && globalThis) {
|
|
28
|
+
_cachedGlobal = globalThis;
|
|
29
|
+
}
|
|
30
|
+
if (typeof self !== strShimUndefined && self) {
|
|
31
|
+
_cachedGlobal = self;
|
|
32
|
+
}
|
|
33
|
+
if (typeof window !== strShimUndefined && window) {
|
|
34
|
+
_cachedGlobal = window;
|
|
35
|
+
}
|
|
36
|
+
if (typeof global !== strShimUndefined && global) {
|
|
37
|
+
_cachedGlobal = global;
|
|
38
|
+
}
|
|
35
39
|
}
|
|
36
|
-
return
|
|
40
|
+
return _cachedGlobal;
|
|
37
41
|
}
|
|
38
42
|
function throwTypeError(message) {
|
|
39
43
|
throw new TypeError(message);
|
|
@@ -424,6 +428,7 @@
|
|
|
424
428
|
var strOnPrefix = "on";
|
|
425
429
|
var strAttachEvent = "attachEvent";
|
|
426
430
|
var strAddEventHelper = "addEventListener";
|
|
431
|
+
var strToISOString = "toISOString";
|
|
427
432
|
var _objDefineProperty = ObjDefineProperty;
|
|
428
433
|
function objToString(obj) {
|
|
429
434
|
return ObjProto.toString.call(obj);
|
|
@@ -490,22 +495,27 @@
|
|
|
490
495
|
return typeof value === "number";
|
|
491
496
|
}
|
|
492
497
|
function toISOString(date) {
|
|
493
|
-
if (
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
498
|
+
if (date) {
|
|
499
|
+
if (date[strToISOString]) {
|
|
500
|
+
return date[strToISOString]();
|
|
501
|
+
}
|
|
502
|
+
if (isDate(date)) {
|
|
503
|
+
var pad = function (num) {
|
|
504
|
+
var r = String(num);
|
|
505
|
+
if (r.length === 1) {
|
|
506
|
+
r = "0" + r;
|
|
507
|
+
}
|
|
508
|
+
return r;
|
|
509
|
+
};
|
|
510
|
+
return date.getUTCFullYear()
|
|
511
|
+
+ "-" + pad(date.getUTCMonth() + 1)
|
|
512
|
+
+ "-" + pad(date.getUTCDate())
|
|
513
|
+
+ "T" + pad(date.getUTCHours())
|
|
514
|
+
+ ":" + pad(date.getUTCMinutes())
|
|
515
|
+
+ ":" + pad(date.getUTCSeconds())
|
|
516
|
+
+ "." + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5)
|
|
517
|
+
+ "Z";
|
|
518
|
+
}
|
|
509
519
|
}
|
|
510
520
|
}
|
|
511
521
|
function arrForEach(arr, callbackfn, thisArg) {
|
|
@@ -798,7 +808,7 @@
|
|
|
798
808
|
}
|
|
799
809
|
function useXDomainRequest() {
|
|
800
810
|
if (_useXDomainRequest === null) {
|
|
801
|
-
_useXDomainRequest = (typeof XDomainRequest !== undefined);
|
|
811
|
+
_useXDomainRequest = (typeof XDomainRequest !== "undefined");
|
|
802
812
|
if (_useXDomainRequest && isXhrSupported()) {
|
|
803
813
|
_useXDomainRequest = _useXDomainRequest && !_hasProperty(getGlobalInst("XMLHttpRequest"), "withCredentials");
|
|
804
814
|
}
|
|
@@ -2057,7 +2067,7 @@
|
|
|
2057
2067
|
return exceptionData;
|
|
2058
2068
|
};
|
|
2059
2069
|
Exception.prototype.toInterface = function () {
|
|
2060
|
-
var _a = this, exceptions = _a.exceptions, properties = _a.properties, measurements = _a.measurements, severityLevel = _a.severityLevel
|
|
2070
|
+
var _a = this, exceptions = _a.exceptions, properties = _a.properties, measurements = _a.measurements, severityLevel = _a.severityLevel, problemGroup = _a.problemGroup, id = _a.id, isManual = _a.isManual;
|
|
2061
2071
|
var exceptionDetailsInterface = exceptions instanceof Array
|
|
2062
2072
|
&& arrMap(exceptions, function (exception) { return exception.toInterface(); })
|
|
2063
2073
|
|| undefined;
|
|
@@ -2832,7 +2842,7 @@
|
|
|
2832
2842
|
}
|
|
2833
2843
|
}
|
|
2834
2844
|
var EnvelopeCreator = {
|
|
2835
|
-
Version: "2.7.
|
|
2845
|
+
Version: "2.7.4-nightly.2201-03"
|
|
2836
2846
|
};
|
|
2837
2847
|
function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
|
|
2838
2848
|
EnvelopeCreatorInit(logger, telemetryItem);
|
|
@@ -3739,6 +3749,8 @@
|
|
|
3739
3749
|
var plainTextBatch = new Blob([batch], { type: "application/json" });
|
|
3740
3750
|
var requestHeaders = new Headers();
|
|
3741
3751
|
var batchLength = batch.length;
|
|
3752
|
+
var ignoreResponse = false;
|
|
3753
|
+
var responseHandled = false;
|
|
3742
3754
|
if (isInternalApplicationInsightsEndpoint(endPointUrl)) {
|
|
3743
3755
|
requestHeaders.append(RequestHeaders.sdkContextHeader, RequestHeaders.sdkContextHeaderAppIdRequest);
|
|
3744
3756
|
}
|
|
@@ -3755,6 +3767,7 @@
|
|
|
3755
3767
|
_a);
|
|
3756
3768
|
if (!isAsync) {
|
|
3757
3769
|
init.keepalive = true;
|
|
3770
|
+
ignoreResponse = true;
|
|
3758
3771
|
_syncFetchPayload += batchLength;
|
|
3759
3772
|
}
|
|
3760
3773
|
var request = new Request(endPointUrl, init);
|
|
@@ -3763,27 +3776,44 @@
|
|
|
3763
3776
|
}
|
|
3764
3777
|
catch (e) {
|
|
3765
3778
|
}
|
|
3766
|
-
fetch(request).then(function (response) {
|
|
3767
|
-
if (!isAsync) {
|
|
3768
|
-
_syncFetchPayload -= batchLength;
|
|
3769
|
-
batchLength = 0;
|
|
3770
|
-
}
|
|
3771
|
-
if (!response.ok) {
|
|
3772
|
-
_self._onError(payload, response.statusText);
|
|
3773
|
-
}
|
|
3774
|
-
else {
|
|
3775
|
-
response.text().then(function (text) {
|
|
3776
|
-
_checkResponsStatus(response.status, payload, response.url, payload.length, response.statusText, text);
|
|
3777
|
-
});
|
|
3778
|
-
}
|
|
3779
|
-
})["catch"](function (error) {
|
|
3780
|
-
if (!isAsync) {
|
|
3781
|
-
_syncFetchPayload -= batchLength;
|
|
3782
|
-
batchLength = 0;
|
|
3783
|
-
}
|
|
3784
|
-
_self._onError(payload, error.message);
|
|
3785
|
-
});
|
|
3786
3779
|
_self._buffer.markAsSent(payload);
|
|
3780
|
+
try {
|
|
3781
|
+
fetch(request).then(function (response) {
|
|
3782
|
+
if (!isAsync) {
|
|
3783
|
+
_syncFetchPayload -= batchLength;
|
|
3784
|
+
batchLength = 0;
|
|
3785
|
+
}
|
|
3786
|
+
if (!responseHandled) {
|
|
3787
|
+
responseHandled = true;
|
|
3788
|
+
if (!response.ok) {
|
|
3789
|
+
_self._onError(payload, response.statusText);
|
|
3790
|
+
}
|
|
3791
|
+
else {
|
|
3792
|
+
response.text().then(function (text) {
|
|
3793
|
+
_checkResponsStatus(response.status, payload, response.url, payload.length, response.statusText, text);
|
|
3794
|
+
});
|
|
3795
|
+
}
|
|
3796
|
+
}
|
|
3797
|
+
})["catch"](function (error) {
|
|
3798
|
+
if (!isAsync) {
|
|
3799
|
+
_syncFetchPayload -= batchLength;
|
|
3800
|
+
batchLength = 0;
|
|
3801
|
+
}
|
|
3802
|
+
if (!responseHandled) {
|
|
3803
|
+
responseHandled = true;
|
|
3804
|
+
_self._onError(payload, error.message);
|
|
3805
|
+
}
|
|
3806
|
+
});
|
|
3807
|
+
}
|
|
3808
|
+
catch (e) {
|
|
3809
|
+
if (!responseHandled) {
|
|
3810
|
+
_self._onError(payload, dumpObj(e));
|
|
3811
|
+
}
|
|
3812
|
+
}
|
|
3813
|
+
if (ignoreResponse && !responseHandled) {
|
|
3814
|
+
responseHandled = true;
|
|
3815
|
+
_self._onSuccess(payload, payload.length);
|
|
3816
|
+
}
|
|
3787
3817
|
}
|
|
3788
3818
|
function _parseResponse(response) {
|
|
3789
3819
|
try {
|