@microsoft/applicationinsights-common 3.4.0-nightlybeta3.2507-22 → 3.4.0-nightlybeta3.2601-13
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/applicationinsights-common.cjs.js +367 -244
- package/browser/es5/applicationinsights-common.cjs.js.map +1 -1
- package/browser/es5/applicationinsights-common.cjs.min.js +2 -2
- package/browser/es5/applicationinsights-common.cjs.min.js.map +1 -1
- package/browser/es5/applicationinsights-common.gbl.js +369 -246
- package/browser/es5/applicationinsights-common.gbl.js.map +1 -1
- package/browser/es5/applicationinsights-common.gbl.min.js +2 -2
- package/browser/es5/applicationinsights-common.gbl.min.js.map +1 -1
- package/browser/es5/applicationinsights-common.integrity.json +25 -25
- package/browser/es5/applicationinsights-common.js +369 -246
- package/browser/es5/applicationinsights-common.js.map +1 -1
- package/browser/es5/applicationinsights-common.min.js +2 -2
- package/browser/es5/applicationinsights-common.min.js.map +1 -1
- package/dist/es5/applicationinsights-common.js +367 -244
- package/dist/es5/applicationinsights-common.js.map +1 -1
- package/dist/es5/applicationinsights-common.min.js +2 -2
- package/dist/es5/applicationinsights-common.min.js.map +1 -1
- package/dist-es5/ConnectionStringParser.js +1 -1
- package/dist-es5/Constants.js +1 -1
- package/dist-es5/DomHelperFuncs.js +1 -1
- package/dist-es5/Enums.js +1 -1
- package/dist-es5/HelperFuncs.js +6 -2
- package/dist-es5/HelperFuncs.js.map +1 -1
- package/dist-es5/Interfaces/ConnectionString.js +1 -1
- package/dist-es5/Interfaces/Context/IApplication.js +1 -1
- package/dist-es5/Interfaces/Context/IDevice.js +1 -1
- package/dist-es5/Interfaces/Context/IInternal.js +1 -1
- package/dist-es5/Interfaces/Context/ILocation.js +1 -1
- package/dist-es5/Interfaces/Context/IOperatingSystem.js +1 -1
- package/dist-es5/Interfaces/Context/ISample.js +1 -1
- package/dist-es5/Interfaces/Context/ISession.js +1 -1
- package/dist-es5/Interfaces/Context/ISessionManager.js +1 -1
- package/dist-es5/Interfaces/Context/ITelemetryTrace.js +1 -1
- package/dist-es5/Interfaces/Context/IUser.js +1 -1
- package/dist-es5/Interfaces/Context/IWeb.js +1 -1
- package/dist-es5/Interfaces/Contracts/AvailabilityData.js +1 -1
- package/dist-es5/Interfaces/Contracts/ContextTagKeys.js +2 -1
- package/dist-es5/Interfaces/Contracts/ContextTagKeys.js.map +1 -1
- package/dist-es5/Interfaces/Contracts/DataPointType.js +1 -1
- package/dist-es5/Interfaces/Contracts/DependencyKind.js +1 -1
- package/dist-es5/Interfaces/Contracts/DependencySourceType.js +1 -1
- package/dist-es5/Interfaces/Contracts/IBase.js +1 -1
- package/dist-es5/Interfaces/Contracts/IData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IDataPoint.js +1 -1
- package/dist-es5/Interfaces/Contracts/IDomain.js +1 -1
- package/dist-es5/Interfaces/Contracts/IEnvelope.js +1 -1
- package/dist-es5/Interfaces/Contracts/IEventData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IExceptionData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IExceptionDetails.js +1 -1
- package/dist-es5/Interfaces/Contracts/IMessageData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IMetricData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IPageViewData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IPageViewPerfData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IStackFrame.js +1 -1
- package/dist-es5/Interfaces/Contracts/SeverityLevel.js +1 -1
- package/dist-es5/Interfaces/IAppInsights.js +1 -1
- package/dist-es5/Interfaces/IConfig.js +1 -1
- package/dist-es5/Interfaces/ICorrelationConfig.js +1 -1
- package/dist-es5/Interfaces/IDependencyTelemetry.js +1 -1
- package/dist-es5/Interfaces/IEventTelemetry.js +1 -1
- package/dist-es5/Interfaces/IExceptionTelemetry.js +1 -1
- package/dist-es5/Interfaces/IMetricTelemetry.js +1 -1
- package/dist-es5/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
- package/dist-es5/Interfaces/IPageViewTelemetry.js +1 -1
- package/dist-es5/Interfaces/IPartC.js +1 -1
- package/dist-es5/Interfaces/IPropertiesPlugin.js +1 -1
- package/dist-es5/Interfaces/IRequestContext.js +1 -1
- package/dist-es5/Interfaces/IRequestTelemetry.js +8 -0
- package/dist-es5/Interfaces/IRequestTelemetry.js.map +1 -0
- package/dist-es5/Interfaces/IStorageBuffer.js +1 -1
- package/dist-es5/Interfaces/ITelemetryContext.js +1 -1
- package/dist-es5/Interfaces/IThrottleMgr.js +1 -1
- package/dist-es5/Interfaces/ITraceTelemetry.js +1 -1
- package/dist-es5/Interfaces/PartAExtensions.js +2 -2
- package/dist-es5/Interfaces/PartAExtensions.js.map +1 -1
- package/dist-es5/Interfaces/Telemetry/IEnvelope.js +1 -1
- package/dist-es5/Interfaces/Telemetry/ISerializable.js +1 -1
- package/dist-es5/Offline.js +1 -1
- package/dist-es5/RequestResponseHeaders.js +1 -1
- package/dist-es5/StorageHelperFuncs.js +1 -1
- package/dist-es5/Telemetry/Common/Data.js +5 -1
- package/dist-es5/Telemetry/Common/Data.js.map +1 -1
- package/dist-es5/Telemetry/Common/DataPoint.js +1 -1
- package/dist-es5/Telemetry/Common/DataSanitizer.js +1 -1
- package/dist-es5/Telemetry/Common/Envelope.js +1 -1
- package/dist-es5/Telemetry/DataTypes.js +15 -0
- package/dist-es5/Telemetry/DataTypes.js.map +1 -0
- package/dist-es5/Telemetry/EnvelopeTypes.js +19 -0
- package/dist-es5/Telemetry/EnvelopeTypes.js.map +1 -0
- package/dist-es5/Telemetry/Event.js +11 -3
- package/dist-es5/Telemetry/Event.js.map +1 -1
- package/dist-es5/Telemetry/Exception.js +11 -3
- package/dist-es5/Telemetry/Exception.js.map +1 -1
- package/dist-es5/Telemetry/Metric.js +11 -3
- package/dist-es5/Telemetry/Metric.js.map +1 -1
- package/dist-es5/Telemetry/PageView.js +11 -3
- package/dist-es5/Telemetry/PageView.js.map +1 -1
- package/dist-es5/Telemetry/PageViewPerformance.js +11 -3
- package/dist-es5/Telemetry/PageViewPerformance.js.map +1 -1
- package/dist-es5/Telemetry/RemoteDependencyData.js +16 -4
- package/dist-es5/Telemetry/RemoteDependencyData.js.map +1 -1
- package/dist-es5/Telemetry/Trace.js +11 -3
- package/dist-es5/Telemetry/Trace.js.map +1 -1
- package/dist-es5/TelemetryItemCreator.js +1 -1
- package/dist-es5/ThrottleMgr.js +1 -1
- package/dist-es5/UrlHelperFuncs.js +1 -1
- package/dist-es5/Util.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/dist-es5/applicationinsights-common.js +3 -1
- package/dist-es5/applicationinsights-common.js.map +1 -1
- package/package.json +2 -2
- package/types/applicationinsights-common.d.ts +123 -5
- package/types/applicationinsights-common.namespaced.d.ts +1775 -60
- package/dist-es5/Interfaces/Contracts/RequestData.js +0 -46
- package/dist-es5/Interfaces/Contracts/RequestData.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 3.4.0-nightlybeta3.
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 3.4.0-nightlybeta3.2601-13
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -512,7 +512,6 @@ function createCachedValue(value) {
|
|
|
512
512
|
toJSON: function () { return value; }
|
|
513
513
|
}, "v", { value: value });
|
|
514
514
|
}
|
|
515
|
-
var createDeferredCachedValue = getDeferred;
|
|
516
515
|
/*#__NO_SIDE_EFFECTS__*/
|
|
517
516
|
function getDeferred(cb, argArray) {
|
|
518
517
|
var theValue = {
|
|
@@ -715,6 +714,13 @@ function getPerformance() {
|
|
|
715
714
|
}
|
|
716
715
|
return _perf.v;
|
|
717
716
|
}
|
|
717
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
718
|
+
function safeGetDeferred(cb, defValue, argArray) {
|
|
719
|
+
return getDeferred(function () {
|
|
720
|
+
var result = safe(cb, argArray);
|
|
721
|
+
return result.e ? defValue : result.v;
|
|
722
|
+
});
|
|
723
|
+
}
|
|
718
724
|
var mathRound = ( /*#__PURE__*/_pureRef(MathCls, "round"));
|
|
719
725
|
var objGetOwnPropertyDescriptor = ( /*#__PURE__*/_pureAssign(( /*#__PURE__*/_pureRef(ObjClass$1, GET_OWN_PROPERTY_DESCRIPTOR)), _returnNothing));
|
|
720
726
|
var strEndsWith = ( /*#__PURE__*/_unwrapFunctionWithPoly("endsWith", StrProto, polyStrEndsWith));
|
|
@@ -845,6 +851,7 @@ var _DYN_PUSH = "push";
|
|
|
845
851
|
var _DYN_SPLICE = "splice";
|
|
846
852
|
var _DYN_LOGGER = "logger";
|
|
847
853
|
var _DYN_CANCEL = "cancel";
|
|
854
|
+
var _DYN_STRINGIFY$1 = "stringify";
|
|
848
855
|
var _DYN_TRACE_ID = "traceId";
|
|
849
856
|
var _DYN_SPAN_ID = "spanId";
|
|
850
857
|
var _DYN_TRACE_FLAGS$1 = "traceFlags";
|
|
@@ -853,18 +860,19 @@ var _DYN_VALUE = "value";
|
|
|
853
860
|
var _DYN_UNLOAD = "unload";
|
|
854
861
|
var _DYN_VERSION = "version";
|
|
855
862
|
var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole";
|
|
863
|
+
var _DYN_JOIN = "join";
|
|
856
864
|
var _DYN_MESSAGE_ID = "messageId";
|
|
857
865
|
var _DYN_MESSAGE$1 = "message";
|
|
858
866
|
var _DYN_DIAG_LOG = "diagLog";
|
|
859
867
|
var _DYN_USER_AGENT = "userAgent";
|
|
860
868
|
var _DYN_SPLIT$1 = "split";
|
|
861
869
|
var _DYN_REPLACE = "replace";
|
|
870
|
+
var _DYN_CONCAT = "concat";
|
|
862
871
|
var _DYN_SUBSTRING = "substring";
|
|
863
872
|
var _DYN_INDEX_OF = "indexOf";
|
|
864
873
|
var _DYN_TYPE = "type";
|
|
865
874
|
var _DYN_EVT_NAME = "evtName";
|
|
866
875
|
var _DYN_SET_TRACE_FLAGS = "setTraceFlags";
|
|
867
|
-
var _DYN_TRACE_STATE = "traceState";
|
|
868
876
|
var _DYN_GET_ATTRIBUTE = "getAttribute";
|
|
869
877
|
|
|
870
878
|
var aggregationErrorType;
|
|
@@ -965,7 +973,7 @@ function _isObjectOrArrayPrototype(target) {
|
|
|
965
973
|
function _isObjectArrayOrFunctionPrototype(target) {
|
|
966
974
|
return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
|
|
967
975
|
}
|
|
968
|
-
function _getObjProto(target) {
|
|
976
|
+
function _getObjProto$1(target) {
|
|
969
977
|
var newProto;
|
|
970
978
|
if (target) {
|
|
971
979
|
if (_objGetPrototypeOf) {
|
|
@@ -1039,7 +1047,7 @@ function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
|
|
|
1039
1047
|
_forEachProp(instFuncs, function (name) {
|
|
1040
1048
|
baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
|
|
1041
1049
|
});
|
|
1042
|
-
var baseProto = _getObjProto(classProto);
|
|
1050
|
+
var baseProto = _getObjProto$1(classProto);
|
|
1043
1051
|
var visited = [];
|
|
1044
1052
|
while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
|
|
1045
1053
|
_forEachProp(baseProto, function (name) {
|
|
@@ -1048,7 +1056,7 @@ function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
|
|
|
1048
1056
|
}
|
|
1049
1057
|
});
|
|
1050
1058
|
visited.push(baseProto);
|
|
1051
|
-
baseProto = _getObjProto(baseProto);
|
|
1059
|
+
baseProto = _getObjProto$1(baseProto);
|
|
1052
1060
|
}
|
|
1053
1061
|
return baseFuncs;
|
|
1054
1062
|
}
|
|
@@ -1062,7 +1070,7 @@ function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
|
|
|
1062
1070
|
}
|
|
1063
1071
|
if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
|
|
1064
1072
|
var canAddInst = !objHasOwnProperty(target, funcName);
|
|
1065
|
-
var objProto = _getObjProto(target);
|
|
1073
|
+
var objProto = _getObjProto$1(target);
|
|
1066
1074
|
var visited = [];
|
|
1067
1075
|
while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
|
|
1068
1076
|
var protoFunc = objProto[funcName];
|
|
@@ -1071,7 +1079,7 @@ function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
|
|
|
1071
1079
|
break;
|
|
1072
1080
|
}
|
|
1073
1081
|
visited.push(objProto);
|
|
1074
|
-
objProto = _getObjProto(objProto);
|
|
1082
|
+
objProto = _getObjProto$1(objProto);
|
|
1075
1083
|
}
|
|
1076
1084
|
try {
|
|
1077
1085
|
if (canAddInst) {
|
|
@@ -1089,7 +1097,7 @@ function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
|
|
|
1089
1097
|
function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
|
|
1090
1098
|
var protoFunc = proto[funcName];
|
|
1091
1099
|
if (protoFunc === currentDynProtoProxy) {
|
|
1092
|
-
protoFunc = _getObjProto(proto)[funcName];
|
|
1100
|
+
protoFunc = _getObjProto$1(proto)[funcName];
|
|
1093
1101
|
}
|
|
1094
1102
|
if (typeof protoFunc !== strFunction) {
|
|
1095
1103
|
_throwTypeError("[" + funcName + "] is not a " + strFunction);
|
|
@@ -1129,13 +1137,13 @@ function _populatePrototype(proto, className, target, baseInstFuncs, setInstance
|
|
|
1129
1137
|
function _checkPrototype(classProto, thisTarget) {
|
|
1130
1138
|
if (_objGetPrototypeOf) {
|
|
1131
1139
|
var visited = [];
|
|
1132
|
-
var thisProto = _getObjProto(thisTarget);
|
|
1140
|
+
var thisProto = _getObjProto$1(thisTarget);
|
|
1133
1141
|
while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
|
|
1134
1142
|
if (thisProto === classProto) {
|
|
1135
1143
|
return true;
|
|
1136
1144
|
}
|
|
1137
1145
|
visited.push(thisProto);
|
|
1138
|
-
thisProto = _getObjProto(thisProto);
|
|
1146
|
+
thisProto = _getObjProto$1(thisProto);
|
|
1139
1147
|
}
|
|
1140
1148
|
return false;
|
|
1141
1149
|
}
|
|
@@ -1186,9 +1194,12 @@ var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
|
|
|
1186
1194
|
var STR_REDACTED = "REDACTED";
|
|
1187
1195
|
var DEFAULT_SENSITIVE_PARAMS = ["sig", "Signature", "AWSAccessKeyId", "X-Goog-Signature"];
|
|
1188
1196
|
|
|
1197
|
+
var strGetPrototypeOf = "getPrototypeOf";
|
|
1189
1198
|
var rCamelCase = /-([a-z])/g;
|
|
1190
1199
|
var rNormalizeInvalid = /([^\w\d_$])/g;
|
|
1191
1200
|
var rLeadingNumeric = /^(\d+[\w\d_$])/;
|
|
1201
|
+
var _ProtoNameTag;
|
|
1202
|
+
var _getObjProto = Object[strGetPrototypeOf];
|
|
1192
1203
|
function isNotNullOrUndefined(value) {
|
|
1193
1204
|
return !isNullOrUndefined(value);
|
|
1194
1205
|
}
|
|
@@ -1212,7 +1223,7 @@ function strContains(value, search) {
|
|
|
1212
1223
|
return false;
|
|
1213
1224
|
}
|
|
1214
1225
|
function toISOString(date) {
|
|
1215
|
-
return date && date.toISOString() ||
|
|
1226
|
+
return date && date.toISOString() || STR_EMPTY;
|
|
1216
1227
|
}
|
|
1217
1228
|
function getExceptionName(object) {
|
|
1218
1229
|
if (isError(object)) {
|
|
@@ -1233,6 +1244,35 @@ function createClassFromInterface(defaults) {
|
|
|
1233
1244
|
return class_1;
|
|
1234
1245
|
}());
|
|
1235
1246
|
}
|
|
1247
|
+
function setObjStringTag(target, nameOrFunc) {
|
|
1248
|
+
safe(objDefine, [target, getKnownSymbol(11 ), isFunction(nameOrFunc) ? { g: nameOrFunc, e: false } : { v: nameOrFunc, w: false, e: false }]);
|
|
1249
|
+
return target;
|
|
1250
|
+
}
|
|
1251
|
+
function setProtoTypeName(target, name) {
|
|
1252
|
+
if (target) {
|
|
1253
|
+
var proto_1 = _getObjProto(target);
|
|
1254
|
+
var done_1 = false;
|
|
1255
|
+
if (proto_1) {
|
|
1256
|
+
safe(function () {
|
|
1257
|
+
var newProto = setObjStringTag(objCreate(proto_1), name);
|
|
1258
|
+
if (!_ProtoNameTag) {
|
|
1259
|
+
_ProtoNameTag = createCachedValue(newSymbol("ai$ProtoName"));
|
|
1260
|
+
}
|
|
1261
|
+
objDefine(newProto, _ProtoNameTag.v, {
|
|
1262
|
+
v: true,
|
|
1263
|
+
w: false,
|
|
1264
|
+
e: false
|
|
1265
|
+
});
|
|
1266
|
+
objSetPrototypeOf(target, newProto);
|
|
1267
|
+
done_1 = true;
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
if (!done_1) {
|
|
1271
|
+
safe(setObjStringTag, [target, name]);
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
return target;
|
|
1275
|
+
}
|
|
1236
1276
|
|
|
1237
1277
|
var strLocation = "location";
|
|
1238
1278
|
var strConsole = "console";
|
|
@@ -1356,7 +1396,7 @@ function redactQueryParameters(url, config) {
|
|
|
1356
1396
|
return url;
|
|
1357
1397
|
}
|
|
1358
1398
|
if (config && config.redactQueryParams) {
|
|
1359
|
-
sensitiveParams = DEFAULT_SENSITIVE_PARAMS
|
|
1399
|
+
sensitiveParams = DEFAULT_SENSITIVE_PARAMS[_DYN_CONCAT ](config.redactQueryParams);
|
|
1360
1400
|
}
|
|
1361
1401
|
else {
|
|
1362
1402
|
sensitiveParams = DEFAULT_SENSITIVE_PARAMS;
|
|
@@ -1421,10 +1461,10 @@ function redactQueryParameters(url, config) {
|
|
|
1421
1461
|
if (!anyParamRedacted) {
|
|
1422
1462
|
return url;
|
|
1423
1463
|
}
|
|
1424
|
-
return baseUrl + resultParts
|
|
1464
|
+
return baseUrl + resultParts[_DYN_JOIN ]("&") + fragment;
|
|
1425
1465
|
}
|
|
1426
1466
|
function fieldRedaction(input, config) {
|
|
1427
|
-
if (!input || input[_DYN_INDEX_OF ](" ") !== -1) {
|
|
1467
|
+
if (!input || !isString(input) || input[_DYN_INDEX_OF ](" ") !== -1) {
|
|
1428
1468
|
return input;
|
|
1429
1469
|
}
|
|
1430
1470
|
var isRedactionDisabled = config && config.redactUrls === false;
|
|
@@ -1527,7 +1567,7 @@ function newId(maxLength) {
|
|
|
1527
1567
|
return result;
|
|
1528
1568
|
}
|
|
1529
1569
|
|
|
1530
|
-
var version = '3.4.0-nightlybeta3.
|
|
1570
|
+
var version = '3.4.0-nightlybeta3.2601-13';
|
|
1531
1571
|
var instanceName = "." + newId(6);
|
|
1532
1572
|
var _dataUid = 0;
|
|
1533
1573
|
function _canAcceptData(target) {
|
|
@@ -2193,6 +2233,207 @@ function onConfigChange(config, configHandler, logger) {
|
|
|
2193
2233
|
return createDynamicConfig(config, null, logger)[_DYN_WATCH ](configHandler);
|
|
2194
2234
|
}
|
|
2195
2235
|
|
|
2236
|
+
var _aiNamespace = null;
|
|
2237
|
+
function _getExtensionNamespace() {
|
|
2238
|
+
var target = getInst("Microsoft");
|
|
2239
|
+
if (target) {
|
|
2240
|
+
_aiNamespace = target["ApplicationInsights"];
|
|
2241
|
+
}
|
|
2242
|
+
return _aiNamespace;
|
|
2243
|
+
}
|
|
2244
|
+
function getDebugExt(config) {
|
|
2245
|
+
var ns = _aiNamespace;
|
|
2246
|
+
if (!ns && config.disableDbgExt !== true) {
|
|
2247
|
+
ns = _aiNamespace || _getExtensionNamespace();
|
|
2248
|
+
}
|
|
2249
|
+
return ns ? ns["ChromeDbgExt"] : null;
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
var _a;
|
|
2253
|
+
var STR_WARN_TO_CONSOLE = "warnToConsole";
|
|
2254
|
+
var AiNonUserActionablePrefix = "AI (Internal): ";
|
|
2255
|
+
var AiUserActionablePrefix = "AI: ";
|
|
2256
|
+
var AIInternalMessagePrefix = "AITR_";
|
|
2257
|
+
var defaultValues = {
|
|
2258
|
+
loggingLevelConsole: 0,
|
|
2259
|
+
loggingLevelTelemetry: 1,
|
|
2260
|
+
maxMessageLimit: 25,
|
|
2261
|
+
enableDebug: false
|
|
2262
|
+
};
|
|
2263
|
+
var _logFuncs = (_a = {},
|
|
2264
|
+
_a[0 ] = null,
|
|
2265
|
+
_a[1 ] = "errorToConsole",
|
|
2266
|
+
_a[2 ] = STR_WARN_TO_CONSOLE,
|
|
2267
|
+
_a[3 ] = "debugToConsole",
|
|
2268
|
+
_a);
|
|
2269
|
+
function _sanitizeDiagnosticText(text) {
|
|
2270
|
+
if (text) {
|
|
2271
|
+
return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
|
|
2272
|
+
}
|
|
2273
|
+
return STR_EMPTY;
|
|
2274
|
+
}
|
|
2275
|
+
function _logToConsole(func, message) {
|
|
2276
|
+
var theConsole = getConsole();
|
|
2277
|
+
if (!!theConsole) {
|
|
2278
|
+
var logFunc = "log";
|
|
2279
|
+
if (theConsole[func]) {
|
|
2280
|
+
logFunc = func;
|
|
2281
|
+
}
|
|
2282
|
+
if (isFunction(theConsole[logFunc])) {
|
|
2283
|
+
theConsole[logFunc](message);
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
var _InternalLogMessage = /** @class */ (function () {
|
|
2288
|
+
function _InternalLogMessage(msgId, msg, isUserAct, properties) {
|
|
2289
|
+
if (isUserAct === void 0) { isUserAct = false; }
|
|
2290
|
+
var _self = this;
|
|
2291
|
+
_self[_DYN_MESSAGE_ID ] = msgId;
|
|
2292
|
+
_self[_DYN_MESSAGE$1 ] =
|
|
2293
|
+
(isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
|
|
2294
|
+
msgId;
|
|
2295
|
+
var strProps = STR_EMPTY;
|
|
2296
|
+
if (hasJSON()) {
|
|
2297
|
+
strProps = getJSON()[_DYN_STRINGIFY$1 ](properties);
|
|
2298
|
+
}
|
|
2299
|
+
var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
|
|
2300
|
+
(properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
|
|
2301
|
+
_self[_DYN_MESSAGE$1 ] += diagnosticText;
|
|
2302
|
+
}
|
|
2303
|
+
_InternalLogMessage.dataType = "MessageData";
|
|
2304
|
+
return _InternalLogMessage;
|
|
2305
|
+
}());
|
|
2306
|
+
function safeGetLogger(core, config) {
|
|
2307
|
+
return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
|
|
2308
|
+
}
|
|
2309
|
+
var DiagnosticLogger = /** @class */ (function () {
|
|
2310
|
+
function DiagnosticLogger(config) {
|
|
2311
|
+
this.identifier = "DiagnosticLogger";
|
|
2312
|
+
this.queue = [];
|
|
2313
|
+
var _messageCount = 0;
|
|
2314
|
+
var _messageLogged = {};
|
|
2315
|
+
var _loggingLevelConsole;
|
|
2316
|
+
var _loggingLevelTelemetry;
|
|
2317
|
+
var _maxInternalMessageLimit;
|
|
2318
|
+
var _enableDebug;
|
|
2319
|
+
var _unloadHandler;
|
|
2320
|
+
dynamicProto(DiagnosticLogger, this, function (_self) {
|
|
2321
|
+
_unloadHandler = _setDefaultsFromConfig(config || {});
|
|
2322
|
+
_self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
|
|
2323
|
+
_self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
|
|
2324
|
+
if (isUserAct === void 0) { isUserAct = false; }
|
|
2325
|
+
var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
|
|
2326
|
+
if (_enableDebug) {
|
|
2327
|
+
throw dumpObj(message);
|
|
2328
|
+
}
|
|
2329
|
+
else {
|
|
2330
|
+
var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
|
|
2331
|
+
if (!isUndefined(message[_DYN_MESSAGE$1 ])) {
|
|
2332
|
+
if (isUserAct) {
|
|
2333
|
+
var messageKey = +message[_DYN_MESSAGE_ID ];
|
|
2334
|
+
if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
|
|
2335
|
+
_self[logFunc](message[_DYN_MESSAGE$1 ]);
|
|
2336
|
+
_messageLogged[messageKey] = true;
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
else {
|
|
2340
|
+
if (_loggingLevelConsole >= severity) {
|
|
2341
|
+
_self[logFunc](message[_DYN_MESSAGE$1 ]);
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
_logInternalMessage(severity, message);
|
|
2345
|
+
}
|
|
2346
|
+
else {
|
|
2347
|
+
_debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
};
|
|
2351
|
+
_self.debugToConsole = function (message) {
|
|
2352
|
+
_logToConsole("debug", message);
|
|
2353
|
+
_debugExtMsg("warning", message);
|
|
2354
|
+
};
|
|
2355
|
+
_self[_DYN_WARN_TO_CONSOLE ] = function (message) {
|
|
2356
|
+
_logToConsole("warn", message);
|
|
2357
|
+
_debugExtMsg("warning", message);
|
|
2358
|
+
};
|
|
2359
|
+
_self.errorToConsole = function (message) {
|
|
2360
|
+
_logToConsole("error", message);
|
|
2361
|
+
_debugExtMsg("error", message);
|
|
2362
|
+
};
|
|
2363
|
+
_self.resetInternalMessageCount = function () {
|
|
2364
|
+
_messageCount = 0;
|
|
2365
|
+
_messageLogged = {};
|
|
2366
|
+
};
|
|
2367
|
+
_self.logInternalMessage = _logInternalMessage;
|
|
2368
|
+
_self[_DYN_UNLOAD ] = function (isAsync) {
|
|
2369
|
+
_unloadHandler && _unloadHandler.rm();
|
|
2370
|
+
_unloadHandler = null;
|
|
2371
|
+
};
|
|
2372
|
+
objDefine(_self, "dbgMode", {
|
|
2373
|
+
g: function () { return _enableDebug; }
|
|
2374
|
+
});
|
|
2375
|
+
function _logInternalMessage(severity, message) {
|
|
2376
|
+
if (_areInternalMessagesThrottled()) {
|
|
2377
|
+
return;
|
|
2378
|
+
}
|
|
2379
|
+
var logMessage = true;
|
|
2380
|
+
var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
|
|
2381
|
+
if (_messageLogged[messageKey]) {
|
|
2382
|
+
logMessage = false;
|
|
2383
|
+
}
|
|
2384
|
+
else {
|
|
2385
|
+
_messageLogged[messageKey] = true;
|
|
2386
|
+
}
|
|
2387
|
+
if (logMessage) {
|
|
2388
|
+
if (severity <= _loggingLevelTelemetry) {
|
|
2389
|
+
_self.queue[_DYN_PUSH ](message);
|
|
2390
|
+
_messageCount++;
|
|
2391
|
+
_debugExtMsg((severity === 1 ? "error" : "warn"), message);
|
|
2392
|
+
}
|
|
2393
|
+
if (_messageCount === _maxInternalMessageLimit) {
|
|
2394
|
+
var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
|
|
2395
|
+
var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
|
|
2396
|
+
_self.queue[_DYN_PUSH ](throttleMessage);
|
|
2397
|
+
if (severity === 1 ) {
|
|
2398
|
+
_self.errorToConsole(throttleLimitMessage);
|
|
2399
|
+
}
|
|
2400
|
+
else {
|
|
2401
|
+
_self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
function _setDefaultsFromConfig(config) {
|
|
2407
|
+
return onConfigChange(createDynamicConfig(config, defaultValues, _self).cfg, function (details) {
|
|
2408
|
+
var config = details.cfg;
|
|
2409
|
+
_loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
|
|
2410
|
+
_loggingLevelTelemetry = config.loggingLevelTelemetry;
|
|
2411
|
+
_maxInternalMessageLimit = config.maxMessageLimit;
|
|
2412
|
+
_enableDebug = config.enableDebug;
|
|
2413
|
+
});
|
|
2414
|
+
}
|
|
2415
|
+
function _areInternalMessagesThrottled() {
|
|
2416
|
+
return _messageCount >= _maxInternalMessageLimit;
|
|
2417
|
+
}
|
|
2418
|
+
function _debugExtMsg(name, data) {
|
|
2419
|
+
var dbgExt = getDebugExt(config || {});
|
|
2420
|
+
if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
|
|
2421
|
+
dbgExt[_DYN_DIAG_LOG ](name, data);
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
});
|
|
2425
|
+
}
|
|
2426
|
+
DiagnosticLogger.__ieDyn=1;
|
|
2427
|
+
return DiagnosticLogger;
|
|
2428
|
+
}());
|
|
2429
|
+
function _getLogger(logger) {
|
|
2430
|
+
return (logger || new DiagnosticLogger());
|
|
2431
|
+
}
|
|
2432
|
+
function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
|
|
2433
|
+
if (isUserAct === void 0) { isUserAct = false; }
|
|
2434
|
+
_getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
|
|
2435
|
+
}
|
|
2436
|
+
|
|
2196
2437
|
function generateW3CId() {
|
|
2197
2438
|
var hexValues = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
|
|
2198
2439
|
var oct = STR_EMPTY, tmp;
|
|
@@ -2464,7 +2705,7 @@ function _isEmpty(items, parent) {
|
|
|
2464
2705
|
return isEmpty;
|
|
2465
2706
|
}
|
|
2466
2707
|
function createW3cTraceState(value, parent) {
|
|
2467
|
-
var cachedItems =
|
|
2708
|
+
var cachedItems = safeGetDeferred(_parseTraceStateList, [], [value || STR_EMPTY]);
|
|
2468
2709
|
function _get(key) {
|
|
2469
2710
|
var value;
|
|
2470
2711
|
var theItems = cachedItems.v;
|
|
@@ -2573,208 +2814,10 @@ function createW3cTraceState(value, parent) {
|
|
|
2573
2814
|
e: false
|
|
2574
2815
|
}
|
|
2575
2816
|
});
|
|
2576
|
-
|
|
2817
|
+
setObjStringTag(traceStateList, _toString);
|
|
2577
2818
|
return traceStateList;
|
|
2578
2819
|
}
|
|
2579
2820
|
|
|
2580
|
-
var _aiNamespace = null;
|
|
2581
|
-
function _getExtensionNamespace() {
|
|
2582
|
-
var target = getInst("Microsoft");
|
|
2583
|
-
if (target) {
|
|
2584
|
-
_aiNamespace = target["ApplicationInsights"];
|
|
2585
|
-
}
|
|
2586
|
-
return _aiNamespace;
|
|
2587
|
-
}
|
|
2588
|
-
function getDebugExt(config) {
|
|
2589
|
-
var ns = _aiNamespace;
|
|
2590
|
-
if (!ns && config.disableDbgExt !== true) {
|
|
2591
|
-
ns = _aiNamespace || _getExtensionNamespace();
|
|
2592
|
-
}
|
|
2593
|
-
return ns ? ns["ChromeDbgExt"] : null;
|
|
2594
|
-
}
|
|
2595
|
-
|
|
2596
|
-
var _a;
|
|
2597
|
-
var STR_WARN_TO_CONSOLE = "warnToConsole";
|
|
2598
|
-
var AiNonUserActionablePrefix = "AI (Internal): ";
|
|
2599
|
-
var AiUserActionablePrefix = "AI: ";
|
|
2600
|
-
var AIInternalMessagePrefix = "AITR_";
|
|
2601
|
-
var defaultValues = {
|
|
2602
|
-
loggingLevelConsole: 0,
|
|
2603
|
-
loggingLevelTelemetry: 1,
|
|
2604
|
-
maxMessageLimit: 25,
|
|
2605
|
-
enableDebug: false
|
|
2606
|
-
};
|
|
2607
|
-
var _logFuncs = (_a = {},
|
|
2608
|
-
_a[0 ] = null,
|
|
2609
|
-
_a[1 ] = "errorToConsole",
|
|
2610
|
-
_a[2 ] = STR_WARN_TO_CONSOLE,
|
|
2611
|
-
_a[3 ] = "debugToConsole",
|
|
2612
|
-
_a);
|
|
2613
|
-
function _sanitizeDiagnosticText(text) {
|
|
2614
|
-
if (text) {
|
|
2615
|
-
return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
|
|
2616
|
-
}
|
|
2617
|
-
return STR_EMPTY;
|
|
2618
|
-
}
|
|
2619
|
-
function _logToConsole(func, message) {
|
|
2620
|
-
var theConsole = getConsole();
|
|
2621
|
-
if (!!theConsole) {
|
|
2622
|
-
var logFunc = "log";
|
|
2623
|
-
if (theConsole[func]) {
|
|
2624
|
-
logFunc = func;
|
|
2625
|
-
}
|
|
2626
|
-
if (isFunction(theConsole[logFunc])) {
|
|
2627
|
-
theConsole[logFunc](message);
|
|
2628
|
-
}
|
|
2629
|
-
}
|
|
2630
|
-
}
|
|
2631
|
-
var _InternalLogMessage = /** @class */ (function () {
|
|
2632
|
-
function _InternalLogMessage(msgId, msg, isUserAct, properties) {
|
|
2633
|
-
if (isUserAct === void 0) { isUserAct = false; }
|
|
2634
|
-
var _self = this;
|
|
2635
|
-
_self[_DYN_MESSAGE_ID ] = msgId;
|
|
2636
|
-
_self[_DYN_MESSAGE$1 ] =
|
|
2637
|
-
(isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
|
|
2638
|
-
msgId;
|
|
2639
|
-
var strProps = STR_EMPTY;
|
|
2640
|
-
if (hasJSON()) {
|
|
2641
|
-
strProps = getJSON().stringify(properties);
|
|
2642
|
-
}
|
|
2643
|
-
var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
|
|
2644
|
-
(properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
|
|
2645
|
-
_self[_DYN_MESSAGE$1 ] += diagnosticText;
|
|
2646
|
-
}
|
|
2647
|
-
_InternalLogMessage.dataType = "MessageData";
|
|
2648
|
-
return _InternalLogMessage;
|
|
2649
|
-
}());
|
|
2650
|
-
function safeGetLogger(core, config) {
|
|
2651
|
-
return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
|
|
2652
|
-
}
|
|
2653
|
-
var DiagnosticLogger = /** @class */ (function () {
|
|
2654
|
-
function DiagnosticLogger(config) {
|
|
2655
|
-
this.identifier = "DiagnosticLogger";
|
|
2656
|
-
this.queue = [];
|
|
2657
|
-
var _messageCount = 0;
|
|
2658
|
-
var _messageLogged = {};
|
|
2659
|
-
var _loggingLevelConsole;
|
|
2660
|
-
var _loggingLevelTelemetry;
|
|
2661
|
-
var _maxInternalMessageLimit;
|
|
2662
|
-
var _enableDebug;
|
|
2663
|
-
var _unloadHandler;
|
|
2664
|
-
dynamicProto(DiagnosticLogger, this, function (_self) {
|
|
2665
|
-
_unloadHandler = _setDefaultsFromConfig(config || {});
|
|
2666
|
-
_self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
|
|
2667
|
-
_self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
|
|
2668
|
-
if (isUserAct === void 0) { isUserAct = false; }
|
|
2669
|
-
var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
|
|
2670
|
-
if (_enableDebug) {
|
|
2671
|
-
throw dumpObj(message);
|
|
2672
|
-
}
|
|
2673
|
-
else {
|
|
2674
|
-
var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
|
|
2675
|
-
if (!isUndefined(message[_DYN_MESSAGE$1 ])) {
|
|
2676
|
-
if (isUserAct) {
|
|
2677
|
-
var messageKey = +message[_DYN_MESSAGE_ID ];
|
|
2678
|
-
if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
|
|
2679
|
-
_self[logFunc](message[_DYN_MESSAGE$1 ]);
|
|
2680
|
-
_messageLogged[messageKey] = true;
|
|
2681
|
-
}
|
|
2682
|
-
}
|
|
2683
|
-
else {
|
|
2684
|
-
if (_loggingLevelConsole >= severity) {
|
|
2685
|
-
_self[logFunc](message[_DYN_MESSAGE$1 ]);
|
|
2686
|
-
}
|
|
2687
|
-
}
|
|
2688
|
-
_logInternalMessage(severity, message);
|
|
2689
|
-
}
|
|
2690
|
-
else {
|
|
2691
|
-
_debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
|
|
2692
|
-
}
|
|
2693
|
-
}
|
|
2694
|
-
};
|
|
2695
|
-
_self.debugToConsole = function (message) {
|
|
2696
|
-
_logToConsole("debug", message);
|
|
2697
|
-
_debugExtMsg("warning", message);
|
|
2698
|
-
};
|
|
2699
|
-
_self[_DYN_WARN_TO_CONSOLE ] = function (message) {
|
|
2700
|
-
_logToConsole("warn", message);
|
|
2701
|
-
_debugExtMsg("warning", message);
|
|
2702
|
-
};
|
|
2703
|
-
_self.errorToConsole = function (message) {
|
|
2704
|
-
_logToConsole("error", message);
|
|
2705
|
-
_debugExtMsg("error", message);
|
|
2706
|
-
};
|
|
2707
|
-
_self.resetInternalMessageCount = function () {
|
|
2708
|
-
_messageCount = 0;
|
|
2709
|
-
_messageLogged = {};
|
|
2710
|
-
};
|
|
2711
|
-
_self.logInternalMessage = _logInternalMessage;
|
|
2712
|
-
_self[_DYN_UNLOAD ] = function (isAsync) {
|
|
2713
|
-
_unloadHandler && _unloadHandler.rm();
|
|
2714
|
-
_unloadHandler = null;
|
|
2715
|
-
};
|
|
2716
|
-
function _logInternalMessage(severity, message) {
|
|
2717
|
-
if (_areInternalMessagesThrottled()) {
|
|
2718
|
-
return;
|
|
2719
|
-
}
|
|
2720
|
-
var logMessage = true;
|
|
2721
|
-
var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
|
|
2722
|
-
if (_messageLogged[messageKey]) {
|
|
2723
|
-
logMessage = false;
|
|
2724
|
-
}
|
|
2725
|
-
else {
|
|
2726
|
-
_messageLogged[messageKey] = true;
|
|
2727
|
-
}
|
|
2728
|
-
if (logMessage) {
|
|
2729
|
-
if (severity <= _loggingLevelTelemetry) {
|
|
2730
|
-
_self.queue[_DYN_PUSH ](message);
|
|
2731
|
-
_messageCount++;
|
|
2732
|
-
_debugExtMsg((severity === 1 ? "error" : "warn"), message);
|
|
2733
|
-
}
|
|
2734
|
-
if (_messageCount === _maxInternalMessageLimit) {
|
|
2735
|
-
var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
|
|
2736
|
-
var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
|
|
2737
|
-
_self.queue[_DYN_PUSH ](throttleMessage);
|
|
2738
|
-
if (severity === 1 ) {
|
|
2739
|
-
_self.errorToConsole(throttleLimitMessage);
|
|
2740
|
-
}
|
|
2741
|
-
else {
|
|
2742
|
-
_self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
|
|
2743
|
-
}
|
|
2744
|
-
}
|
|
2745
|
-
}
|
|
2746
|
-
}
|
|
2747
|
-
function _setDefaultsFromConfig(config) {
|
|
2748
|
-
return onConfigChange(createDynamicConfig(config, defaultValues, _self).cfg, function (details) {
|
|
2749
|
-
var config = details.cfg;
|
|
2750
|
-
_loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
|
|
2751
|
-
_loggingLevelTelemetry = config.loggingLevelTelemetry;
|
|
2752
|
-
_maxInternalMessageLimit = config.maxMessageLimit;
|
|
2753
|
-
_enableDebug = config.enableDebug;
|
|
2754
|
-
});
|
|
2755
|
-
}
|
|
2756
|
-
function _areInternalMessagesThrottled() {
|
|
2757
|
-
return _messageCount >= _maxInternalMessageLimit;
|
|
2758
|
-
}
|
|
2759
|
-
function _debugExtMsg(name, data) {
|
|
2760
|
-
var dbgExt = getDebugExt(config || {});
|
|
2761
|
-
if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
|
|
2762
|
-
dbgExt[_DYN_DIAG_LOG ](name, data);
|
|
2763
|
-
}
|
|
2764
|
-
}
|
|
2765
|
-
});
|
|
2766
|
-
}
|
|
2767
|
-
DiagnosticLogger.__ieDyn=1;
|
|
2768
|
-
return DiagnosticLogger;
|
|
2769
|
-
}());
|
|
2770
|
-
function _getLogger(logger) {
|
|
2771
|
-
return (logger || new DiagnosticLogger());
|
|
2772
|
-
}
|
|
2773
|
-
function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
|
|
2774
|
-
if (isUserAct === void 0) { isUserAct = false; }
|
|
2775
|
-
_getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
2821
|
createElmNodeData("plugin");
|
|
2779
2822
|
function isDistributedTraceContext(obj) {
|
|
2780
2823
|
return obj &&
|
|
@@ -2790,7 +2833,7 @@ function isDistributedTraceContext(obj) {
|
|
|
2790
2833
|
function createDistributedTraceContext(parent) {
|
|
2791
2834
|
var _a;
|
|
2792
2835
|
var parentCtx = null;
|
|
2793
|
-
var
|
|
2836
|
+
var initCtx = null;
|
|
2794
2837
|
var traceId = (parent && isValidTraceId(parent[_DYN_TRACE_ID ])) ? parent[_DYN_TRACE_ID ] : generateW3CId();
|
|
2795
2838
|
var spanId = (parent && isValidSpanId(parent[_DYN_SPAN_ID ])) ? parent[_DYN_SPAN_ID ] : STR_EMPTY;
|
|
2796
2839
|
var traceFlags = parent ? parent[_DYN_TRACE_FLAGS$1 ] : UNDEFINED_VALUE;
|
|
@@ -2803,7 +2846,7 @@ function createDistributedTraceContext(parent) {
|
|
|
2803
2846
|
pageName = parentCtx.getName();
|
|
2804
2847
|
}
|
|
2805
2848
|
else {
|
|
2806
|
-
|
|
2849
|
+
initCtx = parent;
|
|
2807
2850
|
}
|
|
2808
2851
|
}
|
|
2809
2852
|
if (!pageName) {
|
|
@@ -2863,16 +2906,11 @@ function createDistributedTraceContext(parent) {
|
|
|
2863
2906
|
}
|
|
2864
2907
|
function _getTraceState() {
|
|
2865
2908
|
if (!traceState) {
|
|
2866
|
-
|
|
2867
|
-
traceState = createW3cTraceState(spanContext[_DYN_TRACE_STATE ].serialize() || STR_EMPTY, parentCtx ? parentCtx[_DYN_TRACE_STATE ] : undefined);
|
|
2868
|
-
}
|
|
2869
|
-
else {
|
|
2870
|
-
traceState = createW3cTraceState(STR_EMPTY, parentCtx ? parentCtx[_DYN_TRACE_STATE ] : undefined);
|
|
2871
|
-
}
|
|
2909
|
+
traceState = createW3cTraceState(STR_EMPTY, parentCtx ? parentCtx.traceState : (initCtx ? initCtx.traceState : undefined));
|
|
2872
2910
|
}
|
|
2873
2911
|
return traceState;
|
|
2874
2912
|
}
|
|
2875
|
-
var traceCtx = (_a = {
|
|
2913
|
+
var traceCtx = setProtoTypeName((_a = {
|
|
2876
2914
|
getName: _getName,
|
|
2877
2915
|
setName: _setPageNameFn(true),
|
|
2878
2916
|
getTraceId: _getTraceId,
|
|
@@ -2888,7 +2926,7 @@ function createDistributedTraceContext(parent) {
|
|
|
2888
2926
|
_a.traceState = traceState,
|
|
2889
2927
|
_a.isRemote = isRemote,
|
|
2890
2928
|
_a.pageName = pageName,
|
|
2891
|
-
_a);
|
|
2929
|
+
_a), "DistributedTraceContext");
|
|
2892
2930
|
return objDefineProps(traceCtx, {
|
|
2893
2931
|
pageName: {
|
|
2894
2932
|
g: _getName,
|
|
@@ -2915,6 +2953,24 @@ function createDistributedTraceContext(parent) {
|
|
|
2915
2953
|
},
|
|
2916
2954
|
parentCtx: {
|
|
2917
2955
|
g: function () { return parentCtx; }
|
|
2956
|
+
},
|
|
2957
|
+
_parent: {
|
|
2958
|
+
g: function () {
|
|
2959
|
+
var result;
|
|
2960
|
+
if (parentCtx) {
|
|
2961
|
+
result = {
|
|
2962
|
+
t: "traceCtx",
|
|
2963
|
+
v: parentCtx
|
|
2964
|
+
};
|
|
2965
|
+
}
|
|
2966
|
+
else if (initCtx) {
|
|
2967
|
+
result = {
|
|
2968
|
+
t: "initCtx",
|
|
2969
|
+
v: initCtx
|
|
2970
|
+
};
|
|
2971
|
+
}
|
|
2972
|
+
return result;
|
|
2973
|
+
}
|
|
2918
2974
|
}
|
|
2919
2975
|
});
|
|
2920
2976
|
}
|
|
@@ -2966,7 +3022,7 @@ function _getEvtNamespace(eventName, evtNamespace) {
|
|
|
2966
3022
|
var parsedEvent = (eventNamespace.exec(eventName || STR_EMPTY) || []);
|
|
2967
3023
|
return {
|
|
2968
3024
|
type: parsedEvent[1],
|
|
2969
|
-
ns: ((parsedEvent[2] || STR_EMPTY).replace(rRemoveEmptyNs, ".").replace(rRemoveTrailingEmptyNs, STR_EMPTY)
|
|
3025
|
+
ns: ((parsedEvent[2] || STR_EMPTY).replace(rRemoveEmptyNs, ".").replace(rRemoveTrailingEmptyNs, STR_EMPTY).split(".").sort())[_DYN_JOIN ](".")
|
|
2970
3026
|
};
|
|
2971
3027
|
}
|
|
2972
3028
|
function _getRegisteredEvents(target, evtName, addDefault) {
|
|
@@ -3034,7 +3090,7 @@ function mergeEvtNamespace(theNamespace, namespaces) {
|
|
|
3034
3090
|
var newNamespaces;
|
|
3035
3091
|
if (namespaces) {
|
|
3036
3092
|
if (isArray(namespaces)) {
|
|
3037
|
-
newNamespaces = [theNamespace]
|
|
3093
|
+
newNamespaces = [theNamespace][_DYN_CONCAT ](namespaces);
|
|
3038
3094
|
}
|
|
3039
3095
|
else {
|
|
3040
3096
|
newNamespaces = [theNamespace, namespaces];
|
|
@@ -3090,6 +3146,31 @@ function eventOff(target, eventName, handlerRef, evtNamespace, useCapture) {
|
|
|
3090
3146
|
}
|
|
3091
3147
|
}
|
|
3092
3148
|
|
|
3149
|
+
function isTimeSpan(value) {
|
|
3150
|
+
var result = false;
|
|
3151
|
+
if (isString(value)) {
|
|
3152
|
+
var parts = strSplit(value, ":");
|
|
3153
|
+
if (parts[_DYN_LENGTH$1 ] === 3) {
|
|
3154
|
+
var daysHours = strSplit(parts[0], ".");
|
|
3155
|
+
if (daysHours[_DYN_LENGTH$1 ] === 2) {
|
|
3156
|
+
result = !isNaN(parseInt(daysHours[0] || "0")) && !isNaN(parseInt(daysHours[1] || "0"));
|
|
3157
|
+
}
|
|
3158
|
+
else {
|
|
3159
|
+
result = !isNaN(parseInt(daysHours[0] || "0"));
|
|
3160
|
+
}
|
|
3161
|
+
result = result && !isNaN(parseInt(parts[1] || "0"));
|
|
3162
|
+
var secondsParts = strSplit(parts[2], ".");
|
|
3163
|
+
if (secondsParts[_DYN_LENGTH$1 ] === 2) {
|
|
3164
|
+
result = result && !isNaN(parseInt(secondsParts[0] || "0")) && !isNaN(parseInt(secondsParts[1] || "0"));
|
|
3165
|
+
}
|
|
3166
|
+
else {
|
|
3167
|
+
result = result && !isNaN(parseInt(secondsParts[0] || "0"));
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
3171
|
+
return result;
|
|
3172
|
+
}
|
|
3173
|
+
|
|
3093
3174
|
var DisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|
|
3094
3175
|
var SampleRate = "sampleRate";
|
|
3095
3176
|
var ProcessLegacy = "ProcessLegacy";
|
|
@@ -4012,6 +4093,28 @@ var Envelope = /** @class */ (function () {
|
|
|
4012
4093
|
return Envelope;
|
|
4013
4094
|
}());
|
|
4014
4095
|
|
|
4096
|
+
var EventDataType = "EventData";
|
|
4097
|
+
var ExceptionDataType = "ExceptionData";
|
|
4098
|
+
var MetricDataType = "MetricData";
|
|
4099
|
+
var PageViewDataType = "PageviewData";
|
|
4100
|
+
var PageViewPerformanceDataType = "PageviewPerformanceData";
|
|
4101
|
+
var RemoteDependencyDataType = "RemoteDependencyData";
|
|
4102
|
+
var RequestDataType = "RequestData";
|
|
4103
|
+
var TraceDataType = "MessageData";
|
|
4104
|
+
|
|
4105
|
+
/* #__NO_SIDE_EFFECTS__# */
|
|
4106
|
+
function _AddPrefix(name) {
|
|
4107
|
+
return "Microsoft.ApplicationInsights.{0}." + name;
|
|
4108
|
+
}
|
|
4109
|
+
var EventEnvelopeType = ( _AddPrefix("Event"));
|
|
4110
|
+
var ExceptionEnvelopeType = ( _AddPrefix("Exception"));
|
|
4111
|
+
var MetricEnvelopeType = ( _AddPrefix("Metric"));
|
|
4112
|
+
var PageViewEnvelopeType = ( _AddPrefix("Pageview"));
|
|
4113
|
+
var PageViewPerformanceEnvelopeType = ( _AddPrefix("PageviewPerformance"));
|
|
4114
|
+
var RemoteDependencyEnvelopeType = ( _AddPrefix("RemoteDependency"));
|
|
4115
|
+
var RequestEnvelopeType = ( _AddPrefix("Request"));
|
|
4116
|
+
var TraceEnvelopeType = ( _AddPrefix("Message"));
|
|
4117
|
+
|
|
4015
4118
|
var Event$1 = /** @class */ (function () {
|
|
4016
4119
|
function Event(logger, name, properties, measurements) {
|
|
4017
4120
|
this.aiDataContract = {
|
|
@@ -4026,8 +4129,8 @@ var Event$1 = /** @class */ (function () {
|
|
|
4026
4129
|
_self[_DYN_PROPERTIES ] = dataSanitizeProperties(logger, properties);
|
|
4027
4130
|
_self[_DYN_MEASUREMENTS ] = dataSanitizeMeasurements(logger, measurements);
|
|
4028
4131
|
}
|
|
4029
|
-
Event.envelopeType =
|
|
4030
|
-
Event.dataType =
|
|
4132
|
+
Event.envelopeType = EventEnvelopeType;
|
|
4133
|
+
Event.dataType = EventDataType;
|
|
4031
4134
|
return Event;
|
|
4032
4135
|
}());
|
|
4033
4136
|
|
|
@@ -4394,8 +4497,8 @@ var Exception = /** @class */ (function () {
|
|
|
4394
4497
|
]
|
|
4395
4498
|
};
|
|
4396
4499
|
};
|
|
4397
|
-
Exception.envelopeType =
|
|
4398
|
-
Exception.dataType =
|
|
4500
|
+
Exception.envelopeType = ExceptionEnvelopeType;
|
|
4501
|
+
Exception.dataType = ExceptionDataType;
|
|
4399
4502
|
Exception.formatError = _formatErrorCode;
|
|
4400
4503
|
return Exception;
|
|
4401
4504
|
}());
|
|
@@ -4646,8 +4749,8 @@ var Metric = /** @class */ (function () {
|
|
|
4646
4749
|
_self[_DYN_PROPERTIES ] = dataSanitizeProperties(logger, properties);
|
|
4647
4750
|
_self[_DYN_MEASUREMENTS ] = dataSanitizeMeasurements(logger, measurements);
|
|
4648
4751
|
}
|
|
4649
|
-
Metric.envelopeType =
|
|
4650
|
-
Metric.dataType =
|
|
4752
|
+
Metric.envelopeType = MetricEnvelopeType;
|
|
4753
|
+
Metric.dataType = MetricDataType;
|
|
4651
4754
|
return Metric;
|
|
4652
4755
|
}());
|
|
4653
4756
|
|
|
@@ -4660,6 +4763,9 @@ function stringToBoolOrDefault(str, defaultValue) {
|
|
|
4660
4763
|
return str.toString()[_DYN_TO_LOWER_CASE ]() === "true";
|
|
4661
4764
|
}
|
|
4662
4765
|
function msToTimeSpan(totalms) {
|
|
4766
|
+
if (isTimeSpan(totalms)) {
|
|
4767
|
+
return totalms;
|
|
4768
|
+
}
|
|
4663
4769
|
if (isNaN(totalms) || totalms < 0) {
|
|
4664
4770
|
totalms = 0;
|
|
4665
4771
|
}
|
|
@@ -4711,8 +4817,8 @@ var PageView = /** @class */ (function () {
|
|
|
4711
4817
|
_self[_DYN_PROPERTIES ] = dataSanitizeProperties(logger, properties);
|
|
4712
4818
|
_self[_DYN_MEASUREMENTS ] = dataSanitizeMeasurements(logger, measurements);
|
|
4713
4819
|
}
|
|
4714
|
-
PageView.envelopeType =
|
|
4715
|
-
PageView.dataType =
|
|
4820
|
+
PageView.envelopeType = PageViewEnvelopeType;
|
|
4821
|
+
PageView.dataType = PageViewDataType;
|
|
4716
4822
|
return PageView;
|
|
4717
4823
|
}());
|
|
4718
4824
|
|
|
@@ -4747,7 +4853,7 @@ var RemoteDependencyData = /** @class */ (function () {
|
|
|
4747
4853
|
_self.id = id;
|
|
4748
4854
|
_self[_DYN_DURATION ] = msToTimeSpan(value);
|
|
4749
4855
|
_self.success = success;
|
|
4750
|
-
_self.resultCode =
|
|
4856
|
+
_self.resultCode = "" + resultCode;
|
|
4751
4857
|
_self.type = dataSanitizeString(logger, requestAPI);
|
|
4752
4858
|
var dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);
|
|
4753
4859
|
_self.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data;
|
|
@@ -4759,8 +4865,8 @@ var RemoteDependencyData = /** @class */ (function () {
|
|
|
4759
4865
|
_self[_DYN_PROPERTIES ] = dataSanitizeProperties(logger, properties);
|
|
4760
4866
|
_self[_DYN_MEASUREMENTS ] = dataSanitizeMeasurements(logger, measurements);
|
|
4761
4867
|
}
|
|
4762
|
-
RemoteDependencyData.envelopeType =
|
|
4763
|
-
RemoteDependencyData.dataType =
|
|
4868
|
+
RemoteDependencyData.envelopeType = RemoteDependencyEnvelopeType;
|
|
4869
|
+
RemoteDependencyData.dataType = RemoteDependencyDataType;
|
|
4764
4870
|
return RemoteDependencyData;
|
|
4765
4871
|
}());
|
|
4766
4872
|
|
|
@@ -4782,8 +4888,8 @@ var Trace = /** @class */ (function () {
|
|
|
4782
4888
|
_self[_DYN_SEVERITY_LEVEL ] = severityLevel;
|
|
4783
4889
|
}
|
|
4784
4890
|
}
|
|
4785
|
-
Trace.envelopeType =
|
|
4786
|
-
Trace.dataType =
|
|
4891
|
+
Trace.envelopeType = TraceEnvelopeType;
|
|
4892
|
+
Trace.dataType = TraceDataType;
|
|
4787
4893
|
return Trace;
|
|
4788
4894
|
}());
|
|
4789
4895
|
|
|
@@ -4817,8 +4923,8 @@ var PageViewPerformance = /** @class */ (function () {
|
|
|
4817
4923
|
_self.sentRequest = cs4BaseData.sentRequest;
|
|
4818
4924
|
}
|
|
4819
4925
|
}
|
|
4820
|
-
PageViewPerformance.envelopeType =
|
|
4821
|
-
PageViewPerformance.dataType =
|
|
4926
|
+
PageViewPerformance.envelopeType = PageViewPerformanceEnvelopeType;
|
|
4927
|
+
PageViewPerformance.dataType = PageViewPerformanceDataType;
|
|
4822
4928
|
return PageViewPerformance;
|
|
4823
4929
|
}());
|
|
4824
4930
|
|
|
@@ -4873,6 +4979,7 @@ var _aiSession = _aiNameFunc("session");
|
|
|
4873
4979
|
var _aiUser = _aiNameFunc("user");
|
|
4874
4980
|
var _aiCloud = _aiNameFunc("cloud");
|
|
4875
4981
|
var _aiInternal = _aiNameFunc("internal");
|
|
4982
|
+
|
|
4876
4983
|
var ContextTagKeys = /** @class */ (function (_super) {
|
|
4877
4984
|
__extendsFn(ContextTagKeys, _super);
|
|
4878
4985
|
function ContextTagKeys() {
|
|
@@ -4985,7 +5092,7 @@ var Extensions = {
|
|
|
4985
5092
|
SessionExt: "ses",
|
|
4986
5093
|
SDKExt: "sdk"
|
|
4987
5094
|
};
|
|
4988
|
-
var CtxTagKeys = new ContextTagKeys();
|
|
5095
|
+
var CtxTagKeys = ( /* #__PURE__ */new ContextTagKeys());
|
|
4989
5096
|
|
|
4990
5097
|
function createDomEvent(eventName) {
|
|
4991
5098
|
var event = null;
|
|
@@ -5135,22 +5242,38 @@ exports.DisabledPropertyName = DisabledPropertyName;
|
|
|
5135
5242
|
exports.DistributedTracingModes = DistributedTracingModes;
|
|
5136
5243
|
exports.Envelope = Envelope;
|
|
5137
5244
|
exports.Event = Event$1;
|
|
5245
|
+
exports.EventDataType = EventDataType;
|
|
5246
|
+
exports.EventEnvelopeType = EventEnvelopeType;
|
|
5138
5247
|
exports.EventPersistence = EventPersistence;
|
|
5139
5248
|
exports.Exception = Exception;
|
|
5249
|
+
exports.ExceptionDataType = ExceptionDataType;
|
|
5250
|
+
exports.ExceptionEnvelopeType = ExceptionEnvelopeType;
|
|
5140
5251
|
exports.Extensions = Extensions;
|
|
5141
5252
|
exports.HttpMethod = HttpMethod;
|
|
5142
5253
|
exports.Metric = Metric;
|
|
5254
|
+
exports.MetricDataType = MetricDataType;
|
|
5255
|
+
exports.MetricEnvelopeType = MetricEnvelopeType;
|
|
5143
5256
|
exports.PageView = PageView;
|
|
5257
|
+
exports.PageViewDataType = PageViewDataType;
|
|
5258
|
+
exports.PageViewEnvelopeType = PageViewEnvelopeType;
|
|
5144
5259
|
exports.PageViewPerformance = PageViewPerformance;
|
|
5260
|
+
exports.PageViewPerformanceDataType = PageViewPerformanceDataType;
|
|
5261
|
+
exports.PageViewPerformanceEnvelopeType = PageViewPerformanceEnvelopeType;
|
|
5145
5262
|
exports.ProcessLegacy = ProcessLegacy;
|
|
5146
5263
|
exports.PropertiesPluginIdentifier = PropertiesPluginIdentifier;
|
|
5147
5264
|
exports.RemoteDependencyData = RemoteDependencyData;
|
|
5265
|
+
exports.RemoteDependencyDataType = RemoteDependencyDataType;
|
|
5266
|
+
exports.RemoteDependencyEnvelopeType = RemoteDependencyEnvelopeType;
|
|
5267
|
+
exports.RequestDataType = RequestDataType;
|
|
5268
|
+
exports.RequestEnvelopeType = RequestEnvelopeType;
|
|
5148
5269
|
exports.RequestHeaders = RequestHeaders;
|
|
5149
5270
|
exports.SampleRate = SampleRate;
|
|
5150
5271
|
exports.SeverityLevel = SeverityLevel;
|
|
5151
5272
|
exports.TelemetryItemCreator = TelemetryItemCreator;
|
|
5152
5273
|
exports.ThrottleMgr = ThrottleMgr;
|
|
5153
5274
|
exports.Trace = Trace;
|
|
5275
|
+
exports.TraceDataType = TraceDataType;
|
|
5276
|
+
exports.TraceEnvelopeType = TraceEnvelopeType;
|
|
5154
5277
|
exports.correlationIdCanIncludeCorrelationHeader = correlationIdCanIncludeCorrelationHeader;
|
|
5155
5278
|
exports.correlationIdGetCorrelationContext = correlationIdGetCorrelationContext;
|
|
5156
5279
|
exports.correlationIdGetCorrelationContextValue = correlationIdGetCorrelationContextValue;
|