@microsoft/applicationinsights-analytics-js 2.8.5-nightly.2206-03 → 2.8.5-nightly.2207-01
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-analytics-js.integrity.json +9 -9
- package/browser/applicationinsights-analytics-js.js +1416 -1239
- package/browser/applicationinsights-analytics-js.js.map +1 -1
- package/browser/applicationinsights-analytics-js.min.js +2 -2
- package/browser/applicationinsights-analytics-js.min.js.map +1 -1
- package/dist/applicationinsights-analytics-js.api.json +6 -2
- package/dist/applicationinsights-analytics-js.d.ts +1 -1
- package/dist/applicationinsights-analytics-js.js +1416 -1239
- package/dist/applicationinsights-analytics-js.js.map +1 -1
- package/dist/applicationinsights-analytics-js.min.js +2 -2
- package/dist/applicationinsights-analytics-js.min.js.map +1 -1
- package/dist/applicationinsights-analytics-js.rollup.d.ts +1 -1
- package/dist-esm/JavaScriptSDK/AnalyticsPlugin.js +115 -112
- package/dist-esm/JavaScriptSDK/AnalyticsPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/Telemetry/PageViewManager.js +24 -23
- package/dist-esm/JavaScriptSDK/Telemetry/PageViewManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/Telemetry/PageViewPerformanceManager.js +159 -153
- package/dist-esm/JavaScriptSDK/Telemetry/PageViewPerformanceManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/Telemetry/PageVisitTimeManager.js +90 -87
- package/dist-esm/JavaScriptSDK/Telemetry/PageVisitTimeManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/Timing.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryConfig.js +1 -1
- package/dist-esm/__DynamicConstants.js +61 -0
- package/dist-esm/__DynamicConstants.js.map +1 -0
- package/dist-esm/applicationinsights-analytics-js.js +1 -1
- package/package.json +9 -6
- package/src/JavaScriptSDK/AnalyticsPlugin.ts +49 -51
- package/src/JavaScriptSDK/Telemetry/PageViewManager.ts +18 -18
- package/src/JavaScriptSDK/Telemetry/PageViewPerformanceManager.ts +183 -160
- package/src/JavaScriptSDK/Telemetry/PageVisitTimeManager.ts +108 -100
- package/src/__DynamicConstants.ts +59 -0
- package/types/JavaScriptSDK/AnalyticsPlugin.d.ts +5 -5
- package/types/JavaScriptSDK/Telemetry/PageViewManager.d.ts +1 -1
- package/types/JavaScriptSDK/Telemetry/PageViewPerformanceManager.d.ts +1 -8
- package/types/JavaScriptSDK/Telemetry/PageVisitTimeManager.d.ts +0 -20
- package/types/__DynamicConstants.d.ts +47 -0
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights JavaScript SDK - Web Analytics, 2.8.5-nightly.
|
|
2
|
+
* Microsoft Application Insights JavaScript SDK - Web Analytics, 2.8.5-nightly.2207-01
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Web Analytics, 2.8.5-nightly.
|
|
2
|
+
* Application Insights JavaScript SDK - Web Analytics, 2.8.5-nightly.2207-01
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* ApplicationInsights.ts
|
|
7
|
+
* @copyright Microsoft 2018
|
|
8
|
+
*/
|
|
9
9
|
import { __assignFn as __assign, __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
10
|
+
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
11
|
+
import { AnalyticsPluginIdentifier, Event as EventTelemetry, Exception, Metric, PageView, PageViewPerformance, PropertiesPluginIdentifier, RemoteDependencyData, Trace, createDistributedTraceContextFromTrace, createDomEvent, createTelemetryItem, dataSanitizeString, isCrossOriginError, strNotSpecified, stringToBoolOrDefault, utlDisableStorage, utlEnableStorage } from "@microsoft/applicationinsights-common";
|
|
12
|
+
import { BaseTelemetryPlugin, InstrumentEvent, arrForEach, createProcessTelemetryContext, createUniqueNamespace, dumpObj, eventOff, eventOn, generateW3CId, getDocument, getExceptionName, getHistory, getLocation, getWindow, hasHistory, hasWindow, isFunction, isNullOrUndefined, isString, isUndefined, mergeEvtNamespace, objDefineAccessors, objForEachKey, safeGetCookieMgr, strUndefined, throwError } from "@microsoft/applicationinsights-core-js";
|
|
13
|
+
import { _DYN_ADD_TELEMETRY_INITIA15, _DYN_AUTO_TRACK_PAGE_VISI1, _DYN_COLUMN_NUMBER, _DYN_CORE, _DYN_DATA_TYPE, _DYN_DIAG_LOG, _DYN_DISABLE_EXCEPTION_TR0, _DYN_DISABLE_FLUSH_ON_BEF7, _DYN_ENABLE_AUTO_ROUTE_TR6, _DYN_ENABLE_UNHANDLED_PRO3, _DYN_ENVELOPE_TYPE, _DYN_ERROR, _DYN_ERROR_SRC, _DYN_EXCEPTION, _DYN_HREF, _DYN_IS_BROWSER_LINK_TRAC5, _DYN_IS_STORAGE_USE_DISAB4, _DYN_LENGTH, _DYN_LINE_NUMBER, _DYN_MESSAGE, _DYN_NAME_PREFIX, _DYN_OVERRIDE_PAGE_VIEW_D2, _DYN_POPULATE_PAGE_VIEW_P12, _DYN_SAMPLING_PERCENTAGE, _DYN_SEND_EXCEPTION_INTER13, _DYN_SEND_PAGE_VIEW_INTER10, _DYN_SEND_PAGE_VIEW_PERFO11, _DYN_TO_STRING, _DYN_TRACK, _DYN_TRACK_PAGE_VIEW, _DYN_TRACK_PREVIOUS_PAGE_9, _DYN__CREATE_AUTO_EXCEPTI14, _DYN__ONERROR } from "../__DynamicConstants";
|
|
12
14
|
import { PageViewManager } from "./Telemetry/PageViewManager";
|
|
13
|
-
import { PageVisitTimeManager } from "./Telemetry/PageVisitTimeManager";
|
|
14
15
|
import { PageViewPerformanceManager } from "./Telemetry/PageViewPerformanceManager";
|
|
15
|
-
import
|
|
16
|
+
import { PageVisitTimeManager } from "./Telemetry/PageVisitTimeManager";
|
|
16
17
|
import { Timing } from "./Timing";
|
|
17
|
-
"use strict";
|
|
18
|
-
var durationProperty = "duration";
|
|
19
18
|
var strEvent = "event";
|
|
20
19
|
function _dispatchEvent(target, evnt) {
|
|
21
20
|
if (target && target.dispatchEvent && evnt) {
|
|
@@ -25,8 +24,8 @@ function _dispatchEvent(target, evnt) {
|
|
|
25
24
|
function _getReason(error) {
|
|
26
25
|
if (error && error.reason) {
|
|
27
26
|
var reason = error.reason;
|
|
28
|
-
if (!isString(reason) && isFunction(reason
|
|
29
|
-
return reason
|
|
27
|
+
if (!isString(reason) && isFunction(reason[_DYN_TO_STRING /* @min:%2etoString */])) {
|
|
28
|
+
return reason[_DYN_TO_STRING /* @min:%2etoString */]();
|
|
30
29
|
}
|
|
31
30
|
return dumpObj(reason);
|
|
32
31
|
}
|
|
@@ -48,27 +47,27 @@ function _getDefaultConfig(config) {
|
|
|
48
47
|
// set default values
|
|
49
48
|
config.sessionRenewalMs = _configMilliseconds(config.sessionRenewalMs, 30 * 60 * 1000);
|
|
50
49
|
config.sessionExpirationMs = _configMilliseconds(config.sessionExpirationMs, 24 * 60 * 60 * 1000);
|
|
51
|
-
config
|
|
52
|
-
config
|
|
53
|
-
config
|
|
54
|
-
config
|
|
55
|
-
if (isNaN(config
|
|
56
|
-
config
|
|
50
|
+
config[_DYN_DISABLE_EXCEPTION_TR0 /* @min:%2edisableExceptionTracking */] = stringToBoolOrDefault(config[_DYN_DISABLE_EXCEPTION_TR0 /* @min:%2edisableExceptionTracking */]);
|
|
51
|
+
config[_DYN_AUTO_TRACK_PAGE_VISI1 /* @min:%2eautoTrackPageVisitTime */] = stringToBoolOrDefault(config[_DYN_AUTO_TRACK_PAGE_VISI1 /* @min:%2eautoTrackPageVisitTime */]);
|
|
52
|
+
config[_DYN_OVERRIDE_PAGE_VIEW_D2 /* @min:%2eoverridePageViewDuration */] = stringToBoolOrDefault(config[_DYN_OVERRIDE_PAGE_VIEW_D2 /* @min:%2eoverridePageViewDuration */]);
|
|
53
|
+
config[_DYN_ENABLE_UNHANDLED_PRO3 /* @min:%2eenableUnhandledPromiseRejectionTracking */] = stringToBoolOrDefault(config[_DYN_ENABLE_UNHANDLED_PRO3 /* @min:%2eenableUnhandledPromiseRejectionTracking */]);
|
|
54
|
+
if (isNaN(config[_DYN_SAMPLING_PERCENTAGE /* @min:%2esamplingPercentage */]) || config[_DYN_SAMPLING_PERCENTAGE /* @min:%2esamplingPercentage */] <= 0 || config[_DYN_SAMPLING_PERCENTAGE /* @min:%2esamplingPercentage */] >= 100) {
|
|
55
|
+
config[_DYN_SAMPLING_PERCENTAGE /* @min:%2esamplingPercentage */] = 100;
|
|
57
56
|
}
|
|
58
|
-
config
|
|
59
|
-
config
|
|
60
|
-
config
|
|
61
|
-
config
|
|
57
|
+
config[_DYN_IS_STORAGE_USE_DISAB4 /* @min:%2eisStorageUseDisabled */] = stringToBoolOrDefault(config[_DYN_IS_STORAGE_USE_DISAB4 /* @min:%2eisStorageUseDisabled */]);
|
|
58
|
+
config[_DYN_IS_BROWSER_LINK_TRAC5 /* @min:%2eisBrowserLinkTrackingEnabled */] = stringToBoolOrDefault(config[_DYN_IS_BROWSER_LINK_TRAC5 /* @min:%2eisBrowserLinkTrackingEnabled */]);
|
|
59
|
+
config[_DYN_ENABLE_AUTO_ROUTE_TR6 /* @min:%2eenableAutoRouteTracking */] = stringToBoolOrDefault(config[_DYN_ENABLE_AUTO_ROUTE_TR6 /* @min:%2eenableAutoRouteTracking */]);
|
|
60
|
+
config[_DYN_NAME_PREFIX /* @min:%2enamePrefix */] = config[_DYN_NAME_PREFIX /* @min:%2enamePrefix */] || "";
|
|
62
61
|
config.enableDebug = stringToBoolOrDefault(config.enableDebug);
|
|
63
|
-
config
|
|
64
|
-
config.disableFlushOnUnload = stringToBoolOrDefault(config.disableFlushOnUnload, config
|
|
62
|
+
config[_DYN_DISABLE_FLUSH_ON_BEF7 /* @min:%2edisableFlushOnBeforeUnload */] = stringToBoolOrDefault(config[_DYN_DISABLE_FLUSH_ON_BEF7 /* @min:%2edisableFlushOnBeforeUnload */]);
|
|
63
|
+
config.disableFlushOnUnload = stringToBoolOrDefault(config.disableFlushOnUnload, config[_DYN_DISABLE_FLUSH_ON_BEF7 /* @min:%2edisableFlushOnBeforeUnload */]);
|
|
65
64
|
return config;
|
|
66
65
|
}
|
|
67
66
|
function _updateStorageUsage(extConfig) {
|
|
68
67
|
// Not resetting the storage usage as someone may have manually called utlDisableStorage, so this will only
|
|
69
68
|
// reset based if the configuration option is provided
|
|
70
|
-
if (!isUndefined(extConfig
|
|
71
|
-
if (extConfig
|
|
69
|
+
if (!isUndefined(extConfig[_DYN_IS_STORAGE_USE_DISAB4 /* @min:%2eisStorageUseDisabled */])) {
|
|
70
|
+
if (extConfig[_DYN_IS_STORAGE_USE_DISAB4 /* @min:%2eisStorageUseDisabled */]) {
|
|
72
71
|
utlDisableStorage();
|
|
73
72
|
}
|
|
74
73
|
else {
|
|
@@ -110,15 +109,15 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
110
109
|
var _addHook = _base._addHook;
|
|
111
110
|
_initDefaults();
|
|
112
111
|
_self.getCookieMgr = function () {
|
|
113
|
-
return safeGetCookieMgr(_self
|
|
112
|
+
return safeGetCookieMgr(_self[_DYN_CORE /* @min:%2ecore */]);
|
|
114
113
|
};
|
|
115
114
|
_self.processTelemetry = function (env, itemCtx) {
|
|
116
115
|
_self.processNext(env, itemCtx);
|
|
117
116
|
};
|
|
118
117
|
_self.trackEvent = function (event, customProperties) {
|
|
119
118
|
try {
|
|
120
|
-
var telemetryItem = createTelemetryItem(event, EventTelemetry
|
|
121
|
-
_self
|
|
119
|
+
var telemetryItem = createTelemetryItem(event, EventTelemetry[_DYN_DATA_TYPE /* @min:%2edataType */], EventTelemetry[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties);
|
|
120
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
122
121
|
}
|
|
123
122
|
catch (e) {
|
|
124
123
|
_throwInternal(2 /* eLoggingSeverity.WARNING */, 39 /* _eInternalMessageId.TrackTraceFailed */, "trackTrace failed, trace will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
@@ -144,7 +143,7 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
144
143
|
*/
|
|
145
144
|
_self.stopTrackEvent = function (name, properties, measurements) {
|
|
146
145
|
try {
|
|
147
|
-
_eventTracking.stop(name, undefined, properties);
|
|
146
|
+
_eventTracking.stop(name, undefined, properties, measurements);
|
|
148
147
|
}
|
|
149
148
|
catch (e) {
|
|
150
149
|
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 30 /* _eInternalMessageId.StopTrackEventFailed */, "stopTrackEvent failed, event will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
@@ -158,8 +157,8 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
158
157
|
*/
|
|
159
158
|
_self.trackTrace = function (trace, customProperties) {
|
|
160
159
|
try {
|
|
161
|
-
var telemetryItem = createTelemetryItem(trace, Trace
|
|
162
|
-
_self
|
|
160
|
+
var telemetryItem = createTelemetryItem(trace, Trace[_DYN_DATA_TYPE /* @min:%2edataType */], Trace[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties);
|
|
161
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
163
162
|
}
|
|
164
163
|
catch (e) {
|
|
165
164
|
_throwInternal(2 /* eLoggingSeverity.WARNING */, 39 /* _eInternalMessageId.TrackTraceFailed */, "trackTrace failed, trace will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
@@ -178,8 +177,8 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
178
177
|
*/
|
|
179
178
|
_self.trackMetric = function (metric, customProperties) {
|
|
180
179
|
try {
|
|
181
|
-
var telemetryItem = createTelemetryItem(metric, Metric
|
|
182
|
-
_self
|
|
180
|
+
var telemetryItem = createTelemetryItem(metric, Metric[_DYN_DATA_TYPE /* @min:%2edataType */], Metric[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties);
|
|
181
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
183
182
|
}
|
|
184
183
|
catch (e) {
|
|
185
184
|
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 36 /* _eInternalMessageId.TrackMetricFailed */, "trackMetric failed, metric will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
@@ -191,12 +190,12 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
191
190
|
* @param customProperties Additional data used to filter events and metrics. Defaults to empty.
|
|
192
191
|
* If a user wants to provide duration for pageLoad, it'll have to be in pageView.properties.duration
|
|
193
192
|
*/
|
|
194
|
-
_self
|
|
193
|
+
_self[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */] = function (pageView, customProperties) {
|
|
195
194
|
try {
|
|
196
195
|
var inPv = pageView || {};
|
|
197
|
-
_pageViewManager
|
|
198
|
-
if (_self.config
|
|
199
|
-
_pageVisitTimeManager
|
|
196
|
+
_pageViewManager[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */](inPv, __assign(__assign(__assign({}, inPv.properties), inPv.measurements), customProperties));
|
|
197
|
+
if (_self.config[_DYN_AUTO_TRACK_PAGE_VISI1 /* @min:%2eautoTrackPageVisitTime */]) {
|
|
198
|
+
_pageVisitTimeManager[_DYN_TRACK_PREVIOUS_PAGE_9 /* @min:%2etrackPreviousPageVisit */](inPv.name, inPv.uri);
|
|
200
199
|
}
|
|
201
200
|
}
|
|
202
201
|
catch (e) {
|
|
@@ -209,13 +208,13 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
209
208
|
* @param properties Custom properties (Part C) that a user can add to the telemetry item
|
|
210
209
|
* @param systemProperties System level properties (Part A) that a user can add to the telemetry item
|
|
211
210
|
*/
|
|
212
|
-
_self
|
|
211
|
+
_self[_DYN_SEND_PAGE_VIEW_INTER10 /* @min:%2esendPageViewInternal */] = function (pageView, properties, systemProperties) {
|
|
213
212
|
var doc = getDocument();
|
|
214
213
|
if (doc) {
|
|
215
214
|
pageView.refUri = pageView.refUri === undefined ? doc.referrer : pageView.refUri;
|
|
216
215
|
}
|
|
217
|
-
var telemetryItem = createTelemetryItem(pageView, PageView
|
|
218
|
-
_self
|
|
216
|
+
var telemetryItem = createTelemetryItem(pageView, PageView[_DYN_DATA_TYPE /* @min:%2edataType */], PageView[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), properties, systemProperties);
|
|
217
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
219
218
|
// reset ajaxes counter
|
|
220
219
|
_trackAjaxAttempts = 0;
|
|
221
220
|
};
|
|
@@ -224,9 +223,9 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
224
223
|
* @param pageViewPerformance
|
|
225
224
|
* @param properties
|
|
226
225
|
*/
|
|
227
|
-
_self
|
|
228
|
-
var telemetryItem = createTelemetryItem(pageViewPerformance, PageViewPerformance
|
|
229
|
-
_self
|
|
226
|
+
_self[_DYN_SEND_PAGE_VIEW_PERFO11 /* @min:%2esendPageViewPerformanceInternal */] = function (pageViewPerformance, properties, systemProperties) {
|
|
227
|
+
var telemetryItem = createTelemetryItem(pageViewPerformance, PageViewPerformance[_DYN_DATA_TYPE /* @min:%2edataType */], PageViewPerformance[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), properties, systemProperties);
|
|
228
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
230
229
|
};
|
|
231
230
|
/**
|
|
232
231
|
* Send browser performance metrics.
|
|
@@ -236,8 +235,8 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
236
235
|
_self.trackPageViewPerformance = function (pageViewPerformance, customProperties) {
|
|
237
236
|
var inPvp = pageViewPerformance || {};
|
|
238
237
|
try {
|
|
239
|
-
_pageViewPerformanceManager
|
|
240
|
-
_self
|
|
238
|
+
_pageViewPerformanceManager[_DYN_POPULATE_PAGE_VIEW_P12 /* @min:%2epopulatePageViewPerformanceEvent */](inPvp);
|
|
239
|
+
_self[_DYN_SEND_PAGE_VIEW_PERFO11 /* @min:%2esendPageViewPerformanceInternal */](inPvp, customProperties);
|
|
241
240
|
}
|
|
242
241
|
catch (e) {
|
|
243
242
|
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 37 /* _eInternalMessageId.TrackPVFailed */, "trackPageViewPerformance failed, page view will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
@@ -277,11 +276,11 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
277
276
|
}
|
|
278
277
|
if (typeof url !== "string") {
|
|
279
278
|
var loc = getLocation();
|
|
280
|
-
url = loc && loc
|
|
279
|
+
url = loc && loc[_DYN_HREF /* @min:%2ehref */] || "";
|
|
281
280
|
}
|
|
282
281
|
_pageTracking.stop(name, url, properties, measurement);
|
|
283
|
-
if (_self.config
|
|
284
|
-
_pageVisitTimeManager
|
|
282
|
+
if (_self.config[_DYN_AUTO_TRACK_PAGE_VISI1 /* @min:%2eautoTrackPageVisitTime */]) {
|
|
283
|
+
_pageVisitTimeManager[_DYN_TRACK_PREVIOUS_PAGE_9 /* @min:%2etrackPreviousPageVisit */](name, url);
|
|
285
284
|
}
|
|
286
285
|
}
|
|
287
286
|
catch (e) {
|
|
@@ -294,11 +293,11 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
294
293
|
* @param properties
|
|
295
294
|
* @param systemProperties
|
|
296
295
|
*/
|
|
297
|
-
_self
|
|
298
|
-
var theError = exception
|
|
299
|
-
var exceptionPartB = new Exception(_self
|
|
300
|
-
var telemetryItem = createTelemetryItem(exceptionPartB, Exception
|
|
301
|
-
_self
|
|
296
|
+
_self[_DYN_SEND_EXCEPTION_INTER13 /* @min:%2esendExceptionInternal */] = function (exception, customProperties, systemProperties) {
|
|
297
|
+
var theError = exception[_DYN_EXCEPTION /* @min:%2eexception */] || exception[_DYN_ERROR /* @min:%2eerror */] || new Error(strNotSpecified);
|
|
298
|
+
var exceptionPartB = new Exception(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), theError, exception.properties || customProperties, exception.measurements, exception.severityLevel, exception.id).toInterface();
|
|
299
|
+
var telemetryItem = createTelemetryItem(exceptionPartB, Exception[_DYN_DATA_TYPE /* @min:%2edataType */], Exception[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties, systemProperties);
|
|
300
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
302
301
|
};
|
|
303
302
|
/**
|
|
304
303
|
* Log an exception you have caught.
|
|
@@ -310,11 +309,11 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
310
309
|
* @memberof ApplicationInsights
|
|
311
310
|
*/
|
|
312
311
|
_self.trackException = function (exception, customProperties) {
|
|
313
|
-
if (exception && !exception
|
|
314
|
-
exception
|
|
312
|
+
if (exception && !exception[_DYN_EXCEPTION /* @min:%2eexception */] && exception[_DYN_ERROR /* @min:%2eerror */]) {
|
|
313
|
+
exception[_DYN_EXCEPTION /* @min:%2eexception */] = exception[_DYN_ERROR /* @min:%2eerror */];
|
|
315
314
|
}
|
|
316
315
|
try {
|
|
317
|
-
_self
|
|
316
|
+
_self[_DYN_SEND_EXCEPTION_INTER13 /* @min:%2esendExceptionInternal */](exception, customProperties);
|
|
318
317
|
}
|
|
319
318
|
catch (e) {
|
|
320
319
|
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 35 /* _eInternalMessageId.TrackExceptionFailed */, "trackException failed, exception will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
@@ -325,8 +324,8 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
325
324
|
* @param {IAutoExceptionTelemetry} exception
|
|
326
325
|
* @memberof ApplicationInsights
|
|
327
326
|
*/
|
|
328
|
-
_self
|
|
329
|
-
var error = exception && exception
|
|
327
|
+
_self[_DYN__ONERROR /* @min:%2e_onerror */] = function (exception) {
|
|
328
|
+
var error = exception && exception[_DYN_ERROR /* @min:%2eerror */];
|
|
330
329
|
var evt = exception && exception.evt;
|
|
331
330
|
try {
|
|
332
331
|
if (!evt) {
|
|
@@ -337,34 +336,34 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
337
336
|
}
|
|
338
337
|
var url = (exception && exception.url) || (getDocument() || {}).URL;
|
|
339
338
|
// If no error source is provided assume the default window.onerror handler
|
|
340
|
-
var errorSrc = exception
|
|
339
|
+
var errorSrc = exception[_DYN_ERROR_SRC /* @min:%2eerrorSrc */] || "window.onerror@" + url + ":" + (exception[_DYN_LINE_NUMBER /* @min:%2elineNumber */] || 0) + ":" + (exception[_DYN_COLUMN_NUMBER /* @min:%2ecolumnNumber */] || 0);
|
|
341
340
|
var properties = {
|
|
342
341
|
errorSrc: errorSrc,
|
|
343
342
|
url: url,
|
|
344
|
-
lineNumber: exception
|
|
345
|
-
columnNumber: exception
|
|
346
|
-
message: exception
|
|
343
|
+
lineNumber: exception[_DYN_LINE_NUMBER /* @min:%2elineNumber */] || 0,
|
|
344
|
+
columnNumber: exception[_DYN_COLUMN_NUMBER /* @min:%2ecolumnNumber */] || 0,
|
|
345
|
+
message: exception[_DYN_MESSAGE /* @min:%2emessage */]
|
|
347
346
|
};
|
|
348
|
-
if (isCrossOriginError(exception.message, exception.url, exception.lineNumber, exception.columnNumber, exception
|
|
349
|
-
_sendCORSException(Exception
|
|
347
|
+
if (isCrossOriginError(exception.message, exception.url, exception.lineNumber, exception.columnNumber, exception[_DYN_ERROR /* @min:%2eerror */])) {
|
|
348
|
+
_sendCORSException(Exception[_DYN__CREATE_AUTO_EXCEPTI14 /* @min:%2eCreateAutoException */]("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.", url, exception[_DYN_LINE_NUMBER /* @min:%2elineNumber */] || 0, exception[_DYN_COLUMN_NUMBER /* @min:%2ecolumnNumber */] || 0, error, evt, null, errorSrc), properties);
|
|
350
349
|
}
|
|
351
350
|
else {
|
|
352
|
-
if (!exception
|
|
353
|
-
exception
|
|
351
|
+
if (!exception[_DYN_ERROR_SRC /* @min:%2eerrorSrc */]) {
|
|
352
|
+
exception[_DYN_ERROR_SRC /* @min:%2eerrorSrc */] = errorSrc;
|
|
354
353
|
}
|
|
355
354
|
_self.trackException({ exception: exception, severityLevel: 3 /* eSeverityLevel.Error */ }, properties);
|
|
356
355
|
}
|
|
357
356
|
}
|
|
358
357
|
catch (e) {
|
|
359
|
-
var errorString = error ? (error.name + ", " + error
|
|
358
|
+
var errorString = error ? (error.name + ", " + error[_DYN_MESSAGE /* @min:%2emessage */]) : "null";
|
|
360
359
|
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 11 /* _eInternalMessageId.ExceptionWhileLoggingError */, "_onError threw exception while logging error, error will not be collected: "
|
|
361
360
|
+ getExceptionName(e), { exception: dumpObj(e), errorString: errorString });
|
|
362
361
|
}
|
|
363
362
|
};
|
|
364
|
-
_self
|
|
365
|
-
if (_self
|
|
363
|
+
_self[_DYN_ADD_TELEMETRY_INITIA15 /* @min:%2eaddTelemetryInitializer */] = function (telemetryInitializer) {
|
|
364
|
+
if (_self[_DYN_CORE /* @min:%2ecore */]) {
|
|
366
365
|
// Just add to the core
|
|
367
|
-
return _self
|
|
366
|
+
return _self[_DYN_CORE /* @min:%2ecore */][_DYN_ADD_TELEMETRY_INITIA15 /* @min:%2eaddTelemetryInitializer */](telemetryInitializer);
|
|
368
367
|
}
|
|
369
368
|
// Handle "pre-initialization" telemetry initializers (for backward compatibility)
|
|
370
369
|
if (!_preInitTelemetryInitializers) {
|
|
@@ -384,40 +383,43 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
384
383
|
_evtNamespace = mergeEvtNamespace(createUniqueNamespace(_self.identifier), core.evtNamespace && core.evtNamespace());
|
|
385
384
|
if (_preInitTelemetryInitializers) {
|
|
386
385
|
arrForEach(_preInitTelemetryInitializers, function (initializer) {
|
|
387
|
-
core
|
|
386
|
+
core[_DYN_ADD_TELEMETRY_INITIA15 /* @min:%2eaddTelemetryInitializer */](initializer);
|
|
388
387
|
});
|
|
389
388
|
_preInitTelemetryInitializers = null;
|
|
390
389
|
}
|
|
391
390
|
var extConfig = _populateDefaults(config);
|
|
392
391
|
_updateStorageUsage(extConfig);
|
|
393
|
-
_pageViewPerformanceManager = new PageViewPerformanceManager(_self
|
|
394
|
-
_pageViewManager = new PageViewManager(_this, extConfig
|
|
395
|
-
_pageVisitTimeManager = new PageVisitTimeManager(_self
|
|
392
|
+
_pageViewPerformanceManager = new PageViewPerformanceManager(_self[_DYN_CORE /* @min:%2ecore */]);
|
|
393
|
+
_pageViewManager = new PageViewManager(_this, extConfig[_DYN_OVERRIDE_PAGE_VIEW_D2 /* @min:%2eoverridePageViewDuration */], _self[_DYN_CORE /* @min:%2ecore */], _pageViewPerformanceManager);
|
|
394
|
+
_pageVisitTimeManager = new PageVisitTimeManager(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), function (pageName, pageUrl, pageVisitTime) { return trackPageVisitTime(pageName, pageUrl, pageVisitTime); });
|
|
396
395
|
_updateBrowserLinkTracking(extConfig, config);
|
|
397
|
-
_eventTracking = new Timing(_self
|
|
396
|
+
_eventTracking = new Timing(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), "trackEvent");
|
|
398
397
|
_eventTracking.action =
|
|
399
|
-
function (name, url, duration, properties) {
|
|
398
|
+
function (name, url, duration, properties, measurements) {
|
|
400
399
|
if (!properties) {
|
|
401
400
|
properties = {};
|
|
402
401
|
}
|
|
403
|
-
|
|
404
|
-
|
|
402
|
+
if (!measurements) {
|
|
403
|
+
measurements = {};
|
|
404
|
+
}
|
|
405
|
+
properties.duration = duration[_DYN_TO_STRING /* @min:%2etoString */]();
|
|
406
|
+
_self.trackEvent({ name: name, properties: properties, measurements: measurements });
|
|
405
407
|
};
|
|
406
408
|
// initialize page view timing
|
|
407
|
-
_pageTracking = new Timing(_self
|
|
409
|
+
_pageTracking = new Timing(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), "trackPageView");
|
|
408
410
|
_pageTracking.action = function (name, url, duration, properties, measurements) {
|
|
409
411
|
// duration must be a custom property in order for the collector to extract it
|
|
410
412
|
if (isNullOrUndefined(properties)) {
|
|
411
413
|
properties = {};
|
|
412
414
|
}
|
|
413
|
-
properties
|
|
415
|
+
properties.duration = duration[_DYN_TO_STRING /* @min:%2etoString */]();
|
|
414
416
|
var pageViewItem = {
|
|
415
417
|
name: name,
|
|
416
418
|
uri: url,
|
|
417
419
|
properties: properties,
|
|
418
420
|
measurements: measurements
|
|
419
421
|
};
|
|
420
|
-
_self
|
|
422
|
+
_self[_DYN_SEND_PAGE_VIEW_INTER10 /* @min:%2esendPageViewInternal */](pageViewItem, properties);
|
|
421
423
|
};
|
|
422
424
|
if (hasWindow()) {
|
|
423
425
|
_updateExceptionTracking(extConfig);
|
|
@@ -437,7 +439,7 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
437
439
|
_initDefaults();
|
|
438
440
|
};
|
|
439
441
|
function _populateDefaults(config) {
|
|
440
|
-
var ctx = createProcessTelemetryContext(null, config, _self
|
|
442
|
+
var ctx = createProcessTelemetryContext(null, config, _self[_DYN_CORE /* @min:%2ecore */]);
|
|
441
443
|
var identifier = _self.identifier;
|
|
442
444
|
// load default values if specified
|
|
443
445
|
var defaults = _getDefaultConfig(config);
|
|
@@ -454,7 +456,7 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
454
456
|
return extConfig;
|
|
455
457
|
}
|
|
456
458
|
function _updateBrowserLinkTracking(extConfig, config) {
|
|
457
|
-
_isBrowserLinkTrackingEnabled = extConfig
|
|
459
|
+
_isBrowserLinkTrackingEnabled = extConfig[_DYN_IS_BROWSER_LINK_TRAC5 /* @min:%2eisBrowserLinkTrackingEnabled */] || config[_DYN_IS_BROWSER_LINK_TRAC5 /* @min:%2eisBrowserLinkTrackingEnabled */];
|
|
458
460
|
_addDefaultTelemetryInitializers();
|
|
459
461
|
}
|
|
460
462
|
/**
|
|
@@ -476,10 +478,10 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
476
478
|
if (!_browserLinkInitializerAdded && _isBrowserLinkTrackingEnabled) {
|
|
477
479
|
var browserLinkPaths_1 = ["/browserLinkSignalR/", "/__browserLink/"];
|
|
478
480
|
var dropBrowserLinkRequests = function (envelope) {
|
|
479
|
-
if (_isBrowserLinkTrackingEnabled && envelope.baseType === RemoteDependencyData
|
|
481
|
+
if (_isBrowserLinkTrackingEnabled && envelope.baseType === RemoteDependencyData[_DYN_DATA_TYPE /* @min:%2edataType */]) {
|
|
480
482
|
var remoteData = envelope.baseData;
|
|
481
483
|
if (remoteData) {
|
|
482
|
-
for (var i = 0; i < browserLinkPaths_1
|
|
484
|
+
for (var i = 0; i < browserLinkPaths_1[_DYN_LENGTH /* @min:%2elength */]; i++) {
|
|
483
485
|
if (remoteData.target && remoteData.target.indexOf(browserLinkPaths_1[i]) >= 0) {
|
|
484
486
|
return false;
|
|
485
487
|
}
|
|
@@ -488,25 +490,25 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
488
490
|
}
|
|
489
491
|
return true;
|
|
490
492
|
};
|
|
491
|
-
_self
|
|
493
|
+
_self[_DYN_ADD_TELEMETRY_INITIA15 /* @min:%2eaddTelemetryInitializer */](dropBrowserLinkRequests);
|
|
492
494
|
_browserLinkInitializerAdded = true;
|
|
493
495
|
}
|
|
494
496
|
}
|
|
495
497
|
function _sendCORSException(exception, properties) {
|
|
496
|
-
var telemetryItem = createTelemetryItem(exception, Exception
|
|
497
|
-
_self
|
|
498
|
+
var telemetryItem = createTelemetryItem(exception, Exception[_DYN_DATA_TYPE /* @min:%2edataType */], Exception[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), properties);
|
|
499
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
498
500
|
}
|
|
499
501
|
function _updateExceptionTracking(extConfig) {
|
|
500
502
|
var _window = getWindow();
|
|
501
503
|
var locn = getLocation(true);
|
|
502
|
-
_disableExceptionTracking = extConfig
|
|
504
|
+
_disableExceptionTracking = extConfig[_DYN_DISABLE_EXCEPTION_TR0 /* @min:%2edisableExceptionTracking */];
|
|
503
505
|
if (!_disableExceptionTracking && !_autoExceptionInstrumented && !extConfig.autoExceptionInstrumented) {
|
|
504
506
|
// We want to enable exception auto collection and it has not been done so yet
|
|
505
507
|
_addHook(InstrumentEvent(_window, "onerror", {
|
|
506
508
|
ns: _evtNamespace,
|
|
507
509
|
rsp: function (callDetails, message, url, lineNumber, columnNumber, error) {
|
|
508
510
|
if (!_disableExceptionTracking && callDetails.rslt !== true) {
|
|
509
|
-
_self
|
|
511
|
+
_self[_DYN__ONERROR /* @min:%2e_onerror */](Exception[_DYN__CREATE_AUTO_EXCEPTI14 /* @min:%2eCreateAutoException */](message, url, lineNumber, columnNumber, error, callDetails.evt));
|
|
510
512
|
}
|
|
511
513
|
}
|
|
512
514
|
}, false));
|
|
@@ -517,7 +519,7 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
517
519
|
function _updateLocationChange(extConfig) {
|
|
518
520
|
var win = getWindow();
|
|
519
521
|
var locn = getLocation(true);
|
|
520
|
-
_enableAutoRouteTracking = extConfig
|
|
522
|
+
_enableAutoRouteTracking = extConfig[_DYN_ENABLE_AUTO_ROUTE_TR6 /* @min:%2eenableAutoRouteTracking */] === true;
|
|
521
523
|
/**
|
|
522
524
|
* Create a custom "locationchange" event which is triggered each time the history object is changed
|
|
523
525
|
*/
|
|
@@ -530,12 +532,12 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
530
532
|
}
|
|
531
533
|
function _getDistributedTraceCtx() {
|
|
532
534
|
var distributedTraceCtx = null;
|
|
533
|
-
if (_self
|
|
534
|
-
distributedTraceCtx = _self.
|
|
535
|
+
if (_self[_DYN_CORE /* @min:%2ecore */] && _self[_DYN_CORE /* @min:%2ecore */].getTraceCtx) {
|
|
536
|
+
distributedTraceCtx = _self[_DYN_CORE /* @min:%2ecore */].getTraceCtx(false);
|
|
535
537
|
}
|
|
536
538
|
if (!distributedTraceCtx) {
|
|
537
539
|
// Fallback when using an older Core and PropertiesPlugin
|
|
538
|
-
var properties = _self.
|
|
540
|
+
var properties = _self[_DYN_CORE /* @min:%2ecore */].getPlugin(PropertiesPluginIdentifier);
|
|
539
541
|
if (properties) {
|
|
540
542
|
var context = properties.plugin.context;
|
|
541
543
|
if (context) {
|
|
@@ -549,19 +551,20 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
549
551
|
* Create a custom "locationchange" event which is triggered each time the history object is changed
|
|
550
552
|
*/
|
|
551
553
|
function _addHistoryListener(extConfig, win, history, locn) {
|
|
554
|
+
var namePrefix = extConfig[_DYN_NAME_PREFIX /* @min:%2enamePrefix */] || "";
|
|
552
555
|
function _popstateHandler() {
|
|
553
556
|
if (_enableAutoRouteTracking) {
|
|
554
|
-
_dispatchEvent(win, createDomEvent(
|
|
557
|
+
_dispatchEvent(win, createDomEvent(namePrefix + "locationchange"));
|
|
555
558
|
}
|
|
556
559
|
}
|
|
557
560
|
function _locationChangeHandler() {
|
|
558
561
|
// We always track the changes (if the handler is installed) to handle the feature being disabled between location changes
|
|
559
562
|
if (_currUri) {
|
|
560
563
|
_prevUri = _currUri;
|
|
561
|
-
_currUri = locn && locn
|
|
564
|
+
_currUri = locn && locn[_DYN_HREF /* @min:%2ehref */] || "";
|
|
562
565
|
}
|
|
563
566
|
else {
|
|
564
|
-
_currUri = locn && locn
|
|
567
|
+
_currUri = locn && locn[_DYN_HREF /* @min:%2ehref */] || "";
|
|
565
568
|
}
|
|
566
569
|
if (_enableAutoRouteTracking) {
|
|
567
570
|
var distributedTraceCtx = _getDistributedTraceCtx();
|
|
@@ -572,11 +575,11 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
572
575
|
traceLocationName = locn.pathname + (locn.hash || "");
|
|
573
576
|
}
|
|
574
577
|
// This populates the ai.operation.name which has a maximum size of 1024 so we need to sanitize it
|
|
575
|
-
distributedTraceCtx.setName(dataSanitizeString(_self
|
|
578
|
+
distributedTraceCtx.setName(dataSanitizeString(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), traceLocationName));
|
|
576
579
|
}
|
|
577
580
|
setTimeout((function (uri) {
|
|
578
581
|
// todo: override start time so that it is not affected by autoRoutePVDelay
|
|
579
|
-
_self
|
|
582
|
+
_self[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */]({ refUri: uri, properties: { duration: 0 } }); // SPA route change loading durations are undefined, so send 0
|
|
580
583
|
}).bind(this, _prevUri), _self.autoRoutePVDelay);
|
|
581
584
|
}
|
|
582
585
|
}
|
|
@@ -585,8 +588,8 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
585
588
|
ns: _evtNamespace,
|
|
586
589
|
rsp: function () {
|
|
587
590
|
if (_enableAutoRouteTracking) {
|
|
588
|
-
_dispatchEvent(win, createDomEvent(
|
|
589
|
-
_dispatchEvent(win, createDomEvent(
|
|
591
|
+
_dispatchEvent(win, createDomEvent(namePrefix + "pushState"));
|
|
592
|
+
_dispatchEvent(win, createDomEvent(namePrefix + "locationchange"));
|
|
590
593
|
}
|
|
591
594
|
}
|
|
592
595
|
}, true));
|
|
@@ -594,25 +597,25 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
594
597
|
ns: _evtNamespace,
|
|
595
598
|
rsp: function () {
|
|
596
599
|
if (_enableAutoRouteTracking) {
|
|
597
|
-
_dispatchEvent(win, createDomEvent(
|
|
598
|
-
_dispatchEvent(win, createDomEvent(
|
|
600
|
+
_dispatchEvent(win, createDomEvent(namePrefix + "replaceState"));
|
|
601
|
+
_dispatchEvent(win, createDomEvent(namePrefix + "locationchange"));
|
|
599
602
|
}
|
|
600
603
|
}
|
|
601
604
|
}, true));
|
|
602
|
-
eventOn(win,
|
|
603
|
-
eventOn(win,
|
|
605
|
+
eventOn(win, namePrefix + "popstate", _popstateHandler, _evtNamespace);
|
|
606
|
+
eventOn(win, namePrefix + "locationchange", _locationChangeHandler, _evtNamespace);
|
|
604
607
|
_historyListenerAdded = true;
|
|
605
608
|
}
|
|
606
609
|
}
|
|
607
610
|
function _addUnhandledPromiseRejectionTracking(extConfig, _window, _location) {
|
|
608
|
-
_enableUnhandledPromiseRejectionTracking = extConfig
|
|
611
|
+
_enableUnhandledPromiseRejectionTracking = extConfig[_DYN_ENABLE_UNHANDLED_PRO3 /* @min:%2eenableUnhandledPromiseRejectionTracking */] === true;
|
|
609
612
|
if (_enableUnhandledPromiseRejectionTracking && !_autoUnhandledPromiseInstrumented) {
|
|
610
613
|
// We want to enable exception auto collection and it has not been done so yet
|
|
611
614
|
_addHook(InstrumentEvent(_window, "onunhandledrejection", {
|
|
612
615
|
ns: _evtNamespace,
|
|
613
616
|
rsp: function (callDetails, error) {
|
|
614
617
|
if (_enableUnhandledPromiseRejectionTracking && callDetails.rslt !== true) { // handled could be typeof function
|
|
615
|
-
_self
|
|
618
|
+
_self[_DYN__ONERROR /* @min:%2e_onerror */](Exception[_DYN__CREATE_AUTO_EXCEPTI14 /* @min:%2eCreateAutoException */](_getReason(error), _location ? _location[_DYN_HREF /* @min:%2ehref */] : "", 0, 0, error, callDetails.evt));
|
|
616
619
|
}
|
|
617
620
|
}
|
|
618
621
|
}, false));
|
|
@@ -622,11 +625,11 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
622
625
|
}
|
|
623
626
|
/**
|
|
624
627
|
* This method will throw exceptions in debug mode or attempt to log the error as a console warning.
|
|
625
|
-
* @param severity {
|
|
628
|
+
* @param severity {eLoggingSeverity} - The severity of the log message
|
|
626
629
|
* @param message {_InternalLogMessage} - The log message.
|
|
627
630
|
*/
|
|
628
631
|
function _throwInternal(severity, msgId, msg, properties, isUserAct) {
|
|
629
|
-
_self
|
|
632
|
+
_self[_DYN_DIAG_LOG /* @min:%2ediagLog */]().throwInternal(severity, msgId, msg, properties, isUserAct);
|
|
630
633
|
}
|
|
631
634
|
function _initDefaults() {
|
|
632
635
|
_eventTracking = null;
|
|
@@ -650,7 +653,7 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
650
653
|
_trackAjaxAttempts = 0;
|
|
651
654
|
// array with max length of 2 that store current url and previous url for SPA page route change trackPageview use.
|
|
652
655
|
var location = getLocation(true);
|
|
653
|
-
_prevUri = location && location
|
|
656
|
+
_prevUri = location && location[_DYN_HREF /* @min:%2ehref */] || "";
|
|
654
657
|
_currUri = null;
|
|
655
658
|
_evtNamespace = null;
|
|
656
659
|
}
|
|
@@ -680,7 +683,7 @@ var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
680
683
|
// Removed Stub for AnalyticsPlugin.prototype._onerror.
|
|
681
684
|
// Removed Stub for AnalyticsPlugin.prototype.addTelemetryInitializer.
|
|
682
685
|
// Removed Stub for AnalyticsPlugin.prototype.initialize.
|
|
683
|
-
AnalyticsPlugin.Version = "2.8.5-nightly.
|
|
686
|
+
AnalyticsPlugin.Version = "2.8.5-nightly.2207-01"; // Not currently used anywhere
|
|
684
687
|
AnalyticsPlugin.getDefaultConfig = _getDefaultConfig;
|
|
685
688
|
return AnalyticsPlugin;
|
|
686
689
|
}(BaseTelemetryPlugin));
|