@microsoft/applicationinsights-channel-js 2.8.0-nightly.2202-06 → 2.8.0-nightly.2204-06
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 +1666 -1012
- 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 +56 -58
- package/dist/applicationinsights-channel-js.api.md +0 -2
- package/dist/applicationinsights-channel-js.d.ts +1 -2
- package/dist/applicationinsights-channel-js.js +1666 -1012
- 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 -2
- package/dist-esm/EnvelopeCreator.js +5 -5
- package/dist-esm/EnvelopeCreator.js.map +1 -1
- package/dist-esm/Interfaces.js +1 -1
- package/dist-esm/Offline.js +77 -65
- package/dist-esm/Offline.js.map +1 -1
- package/dist-esm/SendBuffer.js +7 -7
- package/dist-esm/SendBuffer.js.map +1 -1
- package/dist-esm/Sender.js +73 -63
- package/dist-esm/Sender.js.map +1 -1
- package/dist-esm/Serializer.js +10 -10
- package/dist-esm/Serializer.js.map +1 -1
- package/dist-esm/TelemetryProcessors/Sample.js +3 -3
- 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 +4 -4
- package/src/EnvelopeCreator.ts +8 -8
- package/src/Offline.ts +88 -76
- package/src/SendBuffer.ts +14 -14
- package/src/Sender.ts +106 -113
- package/src/Serializer.ts +17 -21
- package/src/TelemetryProcessors/Sample.ts +1 -1
- package/src/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.ts +3 -1
- package/types/Offline.d.ts +8 -11
- package/types/Sender.d.ts +0 -1
- package/types/TelemetryProcessors/Sample.d.ts +2 -2
- package/types/tsdoc-metadata.json +1 -1
package/dist-esm/Sender.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Channel, 2.8.0-nightly.
|
|
2
|
+
* Application Insights JavaScript SDK - Channel, 2.8.0-nightly.2204-06
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
var _a;
|
|
@@ -8,8 +8,8 @@ import { SessionStorageSendBuffer, ArraySendBuffer } from "./SendBuffer";
|
|
|
8
8
|
import { DependencyEnvelopeCreator, EventEnvelopeCreator, ExceptionEnvelopeCreator, MetricEnvelopeCreator, PageViewEnvelopeCreator, PageViewPerformanceEnvelopeCreator, TraceEnvelopeCreator } from "./EnvelopeCreator";
|
|
9
9
|
import { Serializer } from "./Serializer"; // todo move to channel
|
|
10
10
|
import { DisabledPropertyName, RequestHeaders, PageView, Event, Trace, Exception, Metric, PageViewPerformance, RemoteDependencyData, ProcessLegacy, BreezeChannelIdentifier, SampleRate, isInternalApplicationInsightsEndpoint, utlCanUseSessionStorage } from "@microsoft/applicationinsights-common";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { getWindow, getNavigator, getJSON, BaseTelemetryPlugin, objForEachKey, isNullOrUndefined, arrForEach, dateNow, dumpObj, getExceptionName, getIEVersion, objKeys, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported, isArray, createUniqueNamespace, mergeEvtNamespace, _throwInternal, _warnToConsole } from "@microsoft/applicationinsights-core-js";
|
|
12
|
+
import { createOfflineListener } from "./Offline";
|
|
13
13
|
import { Sample } from "./TelemetryProcessors/Sample";
|
|
14
14
|
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
15
15
|
var FetchSyncRequestSizeLimitBytes = 65000; // approx 64kb (the current Edge, Firefox and Chrome max limit)
|
|
@@ -60,43 +60,25 @@ var Sender = /** @class */ (function (_super) {
|
|
|
60
60
|
_this.priority = 1001;
|
|
61
61
|
_this.identifier = BreezeChannelIdentifier;
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
63
|
+
* The configuration for this sender instance
|
|
64
64
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
*/
|
|
73
|
-
var _lastSend;
|
|
74
|
-
/**
|
|
75
|
-
* Flag indicating that the sending should be paused
|
|
76
|
-
*/
|
|
77
|
-
var _paused = false;
|
|
78
|
-
/**
|
|
79
|
-
* Handle to the timer for delayed sending of batches of data.
|
|
80
|
-
*/
|
|
81
|
-
var _timeoutHandle;
|
|
65
|
+
_this._senderConfig = _getDefaultAppInsightsChannelConfig();
|
|
66
|
+
// Don't set the defaults here, set them in the _initDefaults() as this is also called during unload
|
|
67
|
+
var _consecutiveErrors; // How many times in a row a retryable error condition has occurred.
|
|
68
|
+
var _retryAt; // The time to retry at in milliseconds from 1970/01/01 (this makes the timer calculation easy).
|
|
69
|
+
var _lastSend; // The time of the last send operation.
|
|
70
|
+
var _paused; // Flag indicating that the sending should be paused
|
|
71
|
+
var _timeoutHandle; // Handle to the timer for delayed sending of batches of data.
|
|
82
72
|
var _serializer;
|
|
83
73
|
var _stamp_specific_redirects;
|
|
84
|
-
var _headers
|
|
85
|
-
// Keep track of the outstanding sync fetch payload total (as sync fetch has limits)
|
|
86
|
-
var
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
var _fallbackSender;
|
|
91
|
-
/**
|
|
92
|
-
* The identified sender to use for the synchronous unload stage
|
|
93
|
-
*/
|
|
94
|
-
var _syncUnloadSender;
|
|
95
|
-
_this._senderConfig = _getDefaultAppInsightsChannelConfig();
|
|
74
|
+
var _headers;
|
|
75
|
+
var _syncFetchPayload = 0; // Keep track of the outstanding sync fetch payload total (as sync fetch has limits)
|
|
76
|
+
var _fallbackSender; // The sender to use if the payload size is too large
|
|
77
|
+
var _syncUnloadSender; // The identified sender to use for the synchronous unload stage
|
|
78
|
+
var _offlineListener;
|
|
79
|
+
var _evtNamespace;
|
|
96
80
|
dynamicProto(Sender, _this, function (_self, _base) {
|
|
97
|
-
|
|
98
|
-
throwError("Method not implemented.");
|
|
99
|
-
}
|
|
81
|
+
_initDefaults();
|
|
100
82
|
_self.pause = function () {
|
|
101
83
|
_clearScheduledTimer();
|
|
102
84
|
_paused = true;
|
|
@@ -112,15 +94,16 @@ var Sender = /** @class */ (function (_super) {
|
|
|
112
94
|
_setupTimer();
|
|
113
95
|
}
|
|
114
96
|
};
|
|
115
|
-
_self.flush = function () {
|
|
97
|
+
_self.flush = function (isAsync, callBack, sendReason) {
|
|
98
|
+
if (isAsync === void 0) { isAsync = true; }
|
|
116
99
|
if (!_paused) {
|
|
117
100
|
// Clear the normal schedule timer as we are going to try and flush ASAP
|
|
118
101
|
_clearScheduledTimer();
|
|
119
102
|
try {
|
|
120
|
-
_self.triggerSend(
|
|
103
|
+
_self.triggerSend(isAsync, null, sendReason || 1 /* ManualFlush */);
|
|
121
104
|
}
|
|
122
105
|
catch (e) {
|
|
123
|
-
_self.diagLog()
|
|
106
|
+
_throwInternal(_self.diagLog(), 1 /* CRITICAL */, 22 /* FlushFailed */, "flush failed, telemetry will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
124
107
|
}
|
|
125
108
|
}
|
|
126
109
|
};
|
|
@@ -131,7 +114,7 @@ var Sender = /** @class */ (function (_super) {
|
|
|
131
114
|
_self.triggerSend(true, _doUnloadSend, 2 /* Unload */);
|
|
132
115
|
}
|
|
133
116
|
catch (e) {
|
|
134
|
-
_self.diagLog()
|
|
117
|
+
_throwInternal(_self.diagLog(), 1 /* CRITICAL */, 20 /* FailedToSendQueuedTelemetry */, "failed to flush with beacon sender on page unload, telemetry will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
135
118
|
}
|
|
136
119
|
}
|
|
137
120
|
else {
|
|
@@ -139,11 +122,13 @@ var Sender = /** @class */ (function (_super) {
|
|
|
139
122
|
}
|
|
140
123
|
}
|
|
141
124
|
};
|
|
142
|
-
_self.teardown = _notImplemented;
|
|
143
125
|
_self.addHeader = function (name, value) {
|
|
144
126
|
_headers[name] = value;
|
|
145
127
|
};
|
|
146
128
|
_self.initialize = function (config, core, extensions, pluginChain) {
|
|
129
|
+
if (_self.isInitialized()) {
|
|
130
|
+
_throwInternal(_self.diagLog(), 1 /* CRITICAL */, 28 /* SenderNotInitialized */, "Sender is already initialized");
|
|
131
|
+
}
|
|
147
132
|
_base.initialize(config, core, extensions, pluginChain);
|
|
148
133
|
var ctx = _self._getTelCtx();
|
|
149
134
|
var identifier = _self.identifier;
|
|
@@ -154,6 +139,8 @@ var Sender = /** @class */ (function (_super) {
|
|
|
154
139
|
_self._sender = null;
|
|
155
140
|
_stamp_specific_redirects = 0;
|
|
156
141
|
var diagLog = _self.diagLog();
|
|
142
|
+
_evtNamespace = mergeEvtNamespace(createUniqueNamespace("Sender"), core.evtNamespace && core.evtNamespace());
|
|
143
|
+
_offlineListener = createOfflineListener(_evtNamespace);
|
|
157
144
|
var defaultConfig = _getDefaultAppInsightsChannelConfig();
|
|
158
145
|
objForEachKey(defaultConfig, function (field, value) {
|
|
159
146
|
_self._senderConfig[field] = function () { return ctx.getConfig(identifier, field, value()); };
|
|
@@ -162,7 +149,7 @@ var Sender = /** @class */ (function (_super) {
|
|
|
162
149
|
? new SessionStorageSendBuffer(diagLog, _self._senderConfig) : new ArraySendBuffer(diagLog, _self._senderConfig);
|
|
163
150
|
_self._sample = new Sample(_self._senderConfig.samplingPercentage(), diagLog);
|
|
164
151
|
if (!_validateInstrumentationKey(config)) {
|
|
165
|
-
diagLog
|
|
152
|
+
_throwInternal(diagLog, 1 /* CRITICAL */, 100 /* InvalidInstrumentationKey */, "Invalid Instrumentation key " + config.instrumentationKey);
|
|
166
153
|
}
|
|
167
154
|
if (!isInternalApplicationInsightsEndpoint(_self._senderConfig.endpointUrl()) && _self._senderConfig.customHeaders() && _self._senderConfig.customHeaders().length > 0) {
|
|
168
155
|
arrForEach(_self._senderConfig.customHeaders(), function (customHeader) {
|
|
@@ -215,12 +202,12 @@ var Sender = /** @class */ (function (_super) {
|
|
|
215
202
|
}
|
|
216
203
|
// validate input
|
|
217
204
|
if (!telemetryItem) {
|
|
218
|
-
itemCtx.diagLog()
|
|
205
|
+
_throwInternal(itemCtx.diagLog(), 1 /* CRITICAL */, 7 /* CannotSendEmptyTelemetry */, "Cannot send empty telemetry");
|
|
219
206
|
return;
|
|
220
207
|
}
|
|
221
208
|
// validate event
|
|
222
209
|
if (telemetryItem.baseData && !telemetryItem.baseType) {
|
|
223
|
-
itemCtx.diagLog()
|
|
210
|
+
_throwInternal(itemCtx.diagLog(), 1 /* CRITICAL */, 70 /* InvalidEvent */, "Cannot send telemetry without baseData and baseType");
|
|
224
211
|
return;
|
|
225
212
|
}
|
|
226
213
|
if (!telemetryItem.baseType) {
|
|
@@ -229,13 +216,13 @@ var Sender = /** @class */ (function (_super) {
|
|
|
229
216
|
}
|
|
230
217
|
// ensure a sender was constructed
|
|
231
218
|
if (!_self._sender) {
|
|
232
|
-
itemCtx.diagLog()
|
|
219
|
+
_throwInternal(itemCtx.diagLog(), 1 /* CRITICAL */, 28 /* SenderNotInitialized */, "Sender was not initialized");
|
|
233
220
|
return;
|
|
234
221
|
}
|
|
235
222
|
// check if this item should be sampled in, else add sampleRate tag
|
|
236
223
|
if (!_isSampledIn(telemetryItem)) {
|
|
237
224
|
// Item is sampled out, do not send it
|
|
238
|
-
itemCtx.diagLog()
|
|
225
|
+
_throwInternal(itemCtx.diagLog(), 2 /* WARNING */, 33 /* TelemetrySampledAndNotSent */, "Telemetry item was sampled out and not sent", { SampleRate: _self._sample.sampleRate });
|
|
239
226
|
return;
|
|
240
227
|
}
|
|
241
228
|
else {
|
|
@@ -247,7 +234,7 @@ var Sender = /** @class */ (function (_super) {
|
|
|
247
234
|
var defaultEnvelopeIkey = telemetryItem.iKey || _self._senderConfig.instrumentationKey();
|
|
248
235
|
var aiEnvelope_1 = Sender.constructEnvelope(telemetryItem, defaultEnvelopeIkey, itemCtx.diagLog(), convertUndefined);
|
|
249
236
|
if (!aiEnvelope_1) {
|
|
250
|
-
itemCtx.diagLog()
|
|
237
|
+
_throwInternal(itemCtx.diagLog(), 1 /* CRITICAL */, 47 /* CreateEnvelopeError */, "Unable to create an AppInsights envelope");
|
|
251
238
|
return;
|
|
252
239
|
}
|
|
253
240
|
var doNotSendItem_1 = false;
|
|
@@ -257,13 +244,13 @@ var Sender = /** @class */ (function (_super) {
|
|
|
257
244
|
try {
|
|
258
245
|
if (callBack && callBack(aiEnvelope_1) === false) {
|
|
259
246
|
doNotSendItem_1 = true;
|
|
260
|
-
itemCtx.diagLog()
|
|
247
|
+
_warnToConsole(itemCtx.diagLog(), "Telemetry processor check returns false");
|
|
261
248
|
}
|
|
262
249
|
}
|
|
263
250
|
catch (e) {
|
|
264
251
|
// log error but dont stop executing rest of the telemetry initializers
|
|
265
252
|
// doNotSendItem = true;
|
|
266
|
-
itemCtx.diagLog()
|
|
253
|
+
_throwInternal(itemCtx.diagLog(), 1 /* CRITICAL */, 64 /* TelemetryInitializerFailed */, "One of telemetry initializers failed, telemetry item will not be sent: " + getExceptionName(e), { exception: dumpObj(e) }, true);
|
|
267
254
|
}
|
|
268
255
|
});
|
|
269
256
|
delete telemetryItem.tags[ProcessLegacy];
|
|
@@ -285,7 +272,7 @@ var Sender = /** @class */ (function (_super) {
|
|
|
285
272
|
_setupTimer();
|
|
286
273
|
}
|
|
287
274
|
catch (e) {
|
|
288
|
-
itemCtx.diagLog()
|
|
275
|
+
_throwInternal(itemCtx.diagLog(), 2 /* WARNING */, 12 /* FailedAddingTelemetryToBuffer */, "Failed adding telemetry to the sender's buffer, some telemetry will be lost: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
289
276
|
}
|
|
290
277
|
// hand off the telemetry item to the next plugin
|
|
291
278
|
_self.processNext(telemetryItem, itemCtx);
|
|
@@ -333,16 +320,21 @@ var Sender = /** @class */ (function (_super) {
|
|
|
333
320
|
/* Ignore this error for IE under v10 */
|
|
334
321
|
var ieVer = getIEVersion();
|
|
335
322
|
if (!ieVer || ieVer > 9) {
|
|
336
|
-
_self.diagLog()
|
|
323
|
+
_throwInternal(_self.diagLog(), 1 /* CRITICAL */, 40 /* TransmissionFailed */, "Telemetry transmission failed, some telemetry will be lost: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
337
324
|
}
|
|
338
325
|
}
|
|
339
326
|
}
|
|
340
327
|
};
|
|
328
|
+
_self._doTeardown = function (unloadCtx, unloadState) {
|
|
329
|
+
_self.onunloadFlush();
|
|
330
|
+
_offlineListener.unload();
|
|
331
|
+
_initDefaults();
|
|
332
|
+
};
|
|
341
333
|
/**
|
|
342
334
|
* error handler
|
|
343
335
|
*/
|
|
344
336
|
_self._onError = function (payload, message, event) {
|
|
345
|
-
_self.diagLog()
|
|
337
|
+
_throwInternal(_self.diagLog(), 2 /* WARNING */, 26 /* OnError */, "Failed to send telemetry.", { message: message });
|
|
346
338
|
_self._buffer.clearSent(payload);
|
|
347
339
|
};
|
|
348
340
|
/**
|
|
@@ -372,7 +364,7 @@ var Sender = /** @class */ (function (_super) {
|
|
|
372
364
|
}
|
|
373
365
|
if (retry.length > 0) {
|
|
374
366
|
_resendPayload(retry);
|
|
375
|
-
_self.diagLog()
|
|
367
|
+
_throwInternal(_self.diagLog(), 2 /* WARNING */, 40 /* TransmissionFailed */, "Partial success. " +
|
|
376
368
|
"Delivered: " + payload.length + ", Failed: " + failed.length +
|
|
377
369
|
". Will retry to send " + retry.length + " our of " + results.itemsReceived + " items");
|
|
378
370
|
}
|
|
@@ -425,19 +417,19 @@ var Sender = /** @class */ (function (_super) {
|
|
|
425
417
|
}
|
|
426
418
|
if (!_self._senderConfig.isRetryDisabled() && _isRetriable(status)) {
|
|
427
419
|
_resendPayload(payload);
|
|
428
|
-
_self.diagLog()
|
|
420
|
+
_throwInternal(_self.diagLog(), 2 /* WARNING */, 40 /* TransmissionFailed */, ". " +
|
|
429
421
|
"Response code " + status + ". Will retry to send " + payload.length + " items.");
|
|
430
422
|
}
|
|
431
423
|
else {
|
|
432
424
|
_self._onError(payload, errorMessage);
|
|
433
425
|
}
|
|
434
426
|
}
|
|
435
|
-
else if (
|
|
427
|
+
else if (_offlineListener && !_offlineListener.isOnline()) { // offline
|
|
436
428
|
// Note: Don't check for status == 0, since adblock gives this code
|
|
437
429
|
if (!_self._senderConfig.isRetryDisabled()) {
|
|
438
430
|
var offlineBackOffMultiplier = 10; // arbritrary number
|
|
439
431
|
_resendPayload(payload, offlineBackOffMultiplier);
|
|
440
|
-
_self.diagLog()
|
|
432
|
+
_throwInternal(_self.diagLog(), 2 /* WARNING */, 40 /* TransmissionFailed */, ". Offline - Response Code: ".concat(status, ". Offline status: ").concat(!_offlineListener.isOnline(), ". Will retry to send ").concat(payload.length, " items."));
|
|
441
433
|
}
|
|
442
434
|
}
|
|
443
435
|
else {
|
|
@@ -525,8 +517,8 @@ var Sender = /** @class */ (function (_super) {
|
|
|
525
517
|
}
|
|
526
518
|
}
|
|
527
519
|
if (droppedPayload.length > 0) {
|
|
528
|
-
_fallbackSender(droppedPayload, true);
|
|
529
|
-
_self.diagLog()
|
|
520
|
+
_fallbackSender && _fallbackSender(droppedPayload, true);
|
|
521
|
+
_throwInternal(_self.diagLog(), 2 /* WARNING */, 40 /* TransmissionFailed */, ". " + "Failed to send telemetry with Beacon API, retried with normal sender.");
|
|
530
522
|
}
|
|
531
523
|
}
|
|
532
524
|
}
|
|
@@ -578,7 +570,7 @@ var Sender = /** @class */ (function (_super) {
|
|
|
578
570
|
else {
|
|
579
571
|
// Payload is going to be too big so just try and send via XHR
|
|
580
572
|
_fallbackSender && _fallbackSender(payload, true);
|
|
581
|
-
_self.diagLog()
|
|
573
|
+
_throwInternal(_self.diagLog(), 2 /* WARNING */, 40 /* TransmissionFailed */, ". " + "Failed to send telemetry with Beacon API, retried with xhrSender.");
|
|
582
574
|
}
|
|
583
575
|
}
|
|
584
576
|
}
|
|
@@ -695,7 +687,7 @@ var Sender = /** @class */ (function (_super) {
|
|
|
695
687
|
}
|
|
696
688
|
}
|
|
697
689
|
catch (e) {
|
|
698
|
-
_self.diagLog()
|
|
690
|
+
_throwInternal(_self.diagLog(), 1 /* CRITICAL */, 43 /* InvalidBackendResponse */, "Cannot parse the response. " + getExceptionName(e), {
|
|
699
691
|
response: response
|
|
700
692
|
});
|
|
701
693
|
}
|
|
@@ -797,7 +789,7 @@ var Sender = /** @class */ (function (_super) {
|
|
|
797
789
|
// If the protocol doesn't match, we can't send the telemetry :(.
|
|
798
790
|
var hostingProtocol = _window && _window.location && _window.location.protocol || "";
|
|
799
791
|
if (_self._senderConfig.endpointUrl().lastIndexOf(hostingProtocol, 0) !== 0) {
|
|
800
|
-
_self.diagLog()
|
|
792
|
+
_throwInternal(_self.diagLog(), 2 /* WARNING */, 40 /* TransmissionFailed */, ". " +
|
|
801
793
|
"Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.");
|
|
802
794
|
buffer.clear();
|
|
803
795
|
return;
|
|
@@ -831,7 +823,7 @@ var Sender = /** @class */ (function (_super) {
|
|
|
831
823
|
manager.eventsSendRequest(sendRequest, isAsync);
|
|
832
824
|
}
|
|
833
825
|
catch (e) {
|
|
834
|
-
_self.diagLog()
|
|
826
|
+
_throwInternal(_self.diagLog(), 1 /* CRITICAL */, 74 /* NotificationException */, "send request notification failed: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
835
827
|
}
|
|
836
828
|
}
|
|
837
829
|
}
|
|
@@ -848,6 +840,25 @@ var Sender = /** @class */ (function (_super) {
|
|
|
848
840
|
var regexp = new RegExp(UUID_Regex);
|
|
849
841
|
return regexp.test(config.instrumentationKey);
|
|
850
842
|
}
|
|
843
|
+
function _initDefaults() {
|
|
844
|
+
_self._sender = null;
|
|
845
|
+
_self._buffer = null;
|
|
846
|
+
_self._appId = null;
|
|
847
|
+
_self._sample = null;
|
|
848
|
+
_headers = {};
|
|
849
|
+
_offlineListener = null;
|
|
850
|
+
_consecutiveErrors = 0;
|
|
851
|
+
_retryAt = null;
|
|
852
|
+
_lastSend = null;
|
|
853
|
+
_paused = false;
|
|
854
|
+
_timeoutHandle = null;
|
|
855
|
+
_serializer = null;
|
|
856
|
+
_stamp_specific_redirects = 0;
|
|
857
|
+
_syncFetchPayload = 0;
|
|
858
|
+
_fallbackSender = null;
|
|
859
|
+
_syncUnloadSender = null;
|
|
860
|
+
_evtNamespace = null;
|
|
861
|
+
}
|
|
851
862
|
});
|
|
852
863
|
return _this;
|
|
853
864
|
}
|
|
@@ -866,7 +877,6 @@ var Sender = /** @class */ (function (_super) {
|
|
|
866
877
|
// Removed Stub for Sender.prototype.resume.
|
|
867
878
|
// Removed Stub for Sender.prototype.flush.
|
|
868
879
|
// Removed Stub for Sender.prototype.onunloadFlush.
|
|
869
|
-
// Removed Stub for Sender.prototype.teardown.
|
|
870
880
|
// Removed Stub for Sender.prototype.initialize.
|
|
871
881
|
// Removed Stub for Sender.prototype.processTelemetry.
|
|
872
882
|
// Removed Stub for Sender.prototype._xhrReadyStateChange.
|