@microsoft/applicationinsights-dependencies-js 2.8.0-beta.2203-09 → 2.8.0-beta.2203-12
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-dependencies-js.integrity.json +9 -9
- package/browser/applicationinsights-dependencies-js.js +151 -112
- package/browser/applicationinsights-dependencies-js.js.map +1 -1
- package/browser/applicationinsights-dependencies-js.min.js +2 -2
- package/browser/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.api.json +1 -1
- package/dist/applicationinsights-dependencies-js.d.ts +1 -1
- package/dist/applicationinsights-dependencies-js.js +151 -112
- package/dist/applicationinsights-dependencies-js.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.min.js +2 -2
- package/dist/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.rollup.d.ts +1 -1
- package/dist-esm/TraceParent.js +1 -1
- package/dist-esm/ajax.js +145 -111
- package/dist-esm/ajax.js.map +1 -1
- package/dist-esm/ajaxRecord.js +1 -1
- package/dist-esm/ajaxUtils.js +1 -1
- package/dist-esm/applicationinsights-dependencies-js.js +1 -1
- package/package.json +4 -4
- package/src/ajax.ts +171 -125
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights XHR dependencies plugin, 2.8.0-beta.2203-
|
|
2
|
+
* Microsoft Application Insights XHR dependencies plugin, 2.8.0-beta.2203-12
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Dependencies Plugin, 2.8.0-beta.2203-
|
|
2
|
+
* Application Insights JavaScript SDK - Dependencies Plugin, 2.8.0-beta.2203-12
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -75,7 +75,9 @@
|
|
|
75
75
|
var __assignFn = ObjAssign || __objAssignFnImpl;
|
|
76
76
|
var extendStaticsFn = function (d, b) {
|
|
77
77
|
extendStaticsFn = ObjClass["setPrototypeOf"] ||
|
|
78
|
-
({ __proto__: [] } instanceof Array && function (d, b) {
|
|
78
|
+
({ __proto__: [] } instanceof Array && function (d, b) {
|
|
79
|
+
d.__proto__ = b;
|
|
80
|
+
}) ||
|
|
79
81
|
function (d, b) {
|
|
80
82
|
for (var p in b) {
|
|
81
83
|
if (b[strShimHasOwnProperty](p)) {
|
|
@@ -90,7 +92,9 @@
|
|
|
90
92
|
throwTypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
91
93
|
}
|
|
92
94
|
extendStaticsFn(d, b);
|
|
93
|
-
function __() {
|
|
95
|
+
function __() {
|
|
96
|
+
this.constructor = d;
|
|
97
|
+
}
|
|
94
98
|
d[strShimPrototype] = b === null ? objCreateFn(b) : (__[strShimPrototype] = b[strShimPrototype], new __());
|
|
95
99
|
}
|
|
96
100
|
|
|
@@ -1138,7 +1142,7 @@
|
|
|
1138
1142
|
}
|
|
1139
1143
|
|
|
1140
1144
|
var _objDefineProperty = ObjDefineProperty;
|
|
1141
|
-
var version = "2.
|
|
1145
|
+
var version = "2.8.0-beta.2203-12";
|
|
1142
1146
|
var instanceName = "." + newId(6);
|
|
1143
1147
|
var _dataUid = 0;
|
|
1144
1148
|
function _createAccessor(target, prop, value) {
|
|
@@ -1236,7 +1240,9 @@
|
|
|
1236
1240
|
var context = {
|
|
1237
1241
|
_next: _moveNext,
|
|
1238
1242
|
ctx: {
|
|
1239
|
-
core: function () {
|
|
1243
|
+
core: function () {
|
|
1244
|
+
return core;
|
|
1245
|
+
},
|
|
1240
1246
|
diagLog: function () {
|
|
1241
1247
|
return safeGetLogger(core, config);
|
|
1242
1248
|
},
|
|
@@ -1770,7 +1776,7 @@
|
|
|
1770
1776
|
eventName = (eventName || "") + theNamespace_1;
|
|
1771
1777
|
}
|
|
1772
1778
|
}
|
|
1773
|
-
var parsedEvent = (eventNamespace.exec(eventName) || []);
|
|
1779
|
+
var parsedEvent = (eventNamespace.exec(eventName || "") || []);
|
|
1774
1780
|
return {
|
|
1775
1781
|
type: parsedEvent[1],
|
|
1776
1782
|
ns: ((parsedEvent[2] || "").replace(rRemoveEmptyNs, ".").replace(rRemoveTrailingEmptyNs, "").split(".").sort()).join(".")
|
|
@@ -2740,6 +2746,7 @@
|
|
|
2740
2746
|
var strAjaxData = "ajaxData";
|
|
2741
2747
|
var strThrowInternal = "throwInternal";
|
|
2742
2748
|
var strFetch = "fetch";
|
|
2749
|
+
var strTrackDependencyDataInternal = "trackDependencyDataInternal";
|
|
2743
2750
|
var _markCount = 0;
|
|
2744
2751
|
function _supportsFetch() {
|
|
2745
2752
|
var _global = getGlobal();
|
|
@@ -2819,77 +2826,41 @@
|
|
|
2819
2826
|
var _this = _super.call(this) || this;
|
|
2820
2827
|
_this.identifier = AjaxMonitor.identifier;
|
|
2821
2828
|
_this.priority = 120;
|
|
2822
|
-
var
|
|
2823
|
-
var
|
|
2824
|
-
var
|
|
2825
|
-
var
|
|
2826
|
-
var
|
|
2827
|
-
var
|
|
2828
|
-
var
|
|
2829
|
-
var _enableAjaxErrorStatusText = false;
|
|
2830
|
-
var _trackAjaxAttempts = 0;
|
|
2829
|
+
var _fetchInitialized;
|
|
2830
|
+
var _xhrInitialized;
|
|
2831
|
+
var _currentWindowHost;
|
|
2832
|
+
var _config;
|
|
2833
|
+
var _enableRequestHeaderTracking;
|
|
2834
|
+
var _enableAjaxErrorStatusText;
|
|
2835
|
+
var _trackAjaxAttempts;
|
|
2831
2836
|
var _context;
|
|
2832
2837
|
var _isUsingW3CHeaders;
|
|
2833
2838
|
var _isUsingAIHeaders;
|
|
2834
2839
|
var _markPrefix;
|
|
2835
|
-
var _enableAjaxPerfTracking
|
|
2836
|
-
var _maxAjaxCallsPerView
|
|
2837
|
-
var _enableResponseHeaderTracking
|
|
2838
|
-
var _disabledUrls
|
|
2840
|
+
var _enableAjaxPerfTracking;
|
|
2841
|
+
var _maxAjaxCallsPerView;
|
|
2842
|
+
var _enableResponseHeaderTracking;
|
|
2843
|
+
var _disabledUrls;
|
|
2844
|
+
var _disableAjaxTracking;
|
|
2845
|
+
var _disableFetchTracking;
|
|
2839
2846
|
var _excludeRequestFromAutoTrackingPatterns;
|
|
2840
2847
|
var _addRequestContext;
|
|
2841
2848
|
var _evtNamespace;
|
|
2842
2849
|
dynamicProto(AjaxMonitor, _this, function (_self, _base) {
|
|
2843
2850
|
var _addHook = _base._addHook;
|
|
2851
|
+
_initDefaults();
|
|
2844
2852
|
_self.initialize = function (config, core, extensions, pluginChain) {
|
|
2845
2853
|
if (!_self.isInitialized()) {
|
|
2846
2854
|
_base.initialize(config, core, extensions, pluginChain);
|
|
2847
|
-
var ctx_1 = _self._getTelCtx();
|
|
2848
|
-
var defaultConfig = AjaxMonitor.getDefaultConfig();
|
|
2849
|
-
objForEachKey(defaultConfig, function (field, value) {
|
|
2850
|
-
_config[field] = ctx_1.getConfig(AjaxMonitor.identifier, field, value);
|
|
2851
|
-
});
|
|
2852
2855
|
_evtNamespace = mergeEvtNamespace(createUniqueNamespace("ajax"), core && core.evtNamespace && core.evtNamespace());
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
_enableAjaxErrorStatusText = _config.enableAjaxErrorStatusText;
|
|
2856
|
-
_enableAjaxPerfTracking = _config.enableAjaxPerfTracking;
|
|
2857
|
-
_maxAjaxCallsPerView = _config.maxAjaxCallsPerView;
|
|
2858
|
-
_enableResponseHeaderTracking = _config.enableResponseHeaderTracking;
|
|
2859
|
-
_excludeRequestFromAutoTrackingPatterns = _config.excludeRequestFromAutoTrackingPatterns;
|
|
2860
|
-
_addRequestContext = _config.addRequestContext;
|
|
2861
|
-
_isUsingAIHeaders = distributedTracingMode === 0 || distributedTracingMode === 1 ;
|
|
2862
|
-
_isUsingW3CHeaders = distributedTracingMode === 1 || distributedTracingMode === 2 ;
|
|
2863
|
-
if (_enableAjaxPerfTracking) {
|
|
2864
|
-
var iKey = config.instrumentationKey || "unkwn";
|
|
2865
|
-
if (iKey.length > 5) {
|
|
2866
|
-
_markPrefix = AJAX_MONITOR_PREFIX + iKey.substring(iKey.length - 5) + ".";
|
|
2867
|
-
}
|
|
2868
|
-
else {
|
|
2869
|
-
_markPrefix = AJAX_MONITOR_PREFIX + iKey + ".";
|
|
2870
|
-
}
|
|
2871
|
-
}
|
|
2872
|
-
if (_config.disableAjaxTracking === false) {
|
|
2873
|
-
_instrumentXhr();
|
|
2874
|
-
}
|
|
2856
|
+
_populateDefaults(config);
|
|
2857
|
+
_instrumentXhr();
|
|
2875
2858
|
_instrumentFetch();
|
|
2876
|
-
|
|
2877
|
-
var propExt = void 0, extIx = 0;
|
|
2878
|
-
while (!propExt && extIx < extensions.length) {
|
|
2879
|
-
if (extensions[extIx] && extensions[extIx].identifier === PropertiesPluginIdentifier) {
|
|
2880
|
-
propExt = extensions[extIx];
|
|
2881
|
-
}
|
|
2882
|
-
extIx++;
|
|
2883
|
-
}
|
|
2884
|
-
if (propExt) {
|
|
2885
|
-
_context = propExt.context;
|
|
2886
|
-
}
|
|
2887
|
-
}
|
|
2859
|
+
_populateContext();
|
|
2888
2860
|
}
|
|
2889
2861
|
};
|
|
2890
2862
|
_self._doTeardown = function () {
|
|
2891
|
-
|
|
2892
|
-
_xhrInitialized = false;
|
|
2863
|
+
_initDefaults();
|
|
2893
2864
|
};
|
|
2894
2865
|
_self.trackDependencyData = function (dependency, properties) {
|
|
2895
2866
|
_self[strTrackDependencyDataInternal](dependency, properties);
|
|
@@ -2972,6 +2943,64 @@
|
|
|
2972
2943
|
}
|
|
2973
2944
|
++_trackAjaxAttempts;
|
|
2974
2945
|
};
|
|
2946
|
+
function _initDefaults() {
|
|
2947
|
+
var location = getLocation();
|
|
2948
|
+
_fetchInitialized = false;
|
|
2949
|
+
_xhrInitialized = false;
|
|
2950
|
+
_currentWindowHost = location && location.host && location.host.toLowerCase();
|
|
2951
|
+
_config = AjaxMonitor.getEmptyConfig();
|
|
2952
|
+
_enableRequestHeaderTracking = false;
|
|
2953
|
+
_enableAjaxErrorStatusText = false;
|
|
2954
|
+
_trackAjaxAttempts = 0;
|
|
2955
|
+
_context = null;
|
|
2956
|
+
_isUsingW3CHeaders = false;
|
|
2957
|
+
_isUsingAIHeaders = false;
|
|
2958
|
+
_markPrefix = null;
|
|
2959
|
+
_enableAjaxPerfTracking = false;
|
|
2960
|
+
_maxAjaxCallsPerView = 0;
|
|
2961
|
+
_enableResponseHeaderTracking = false;
|
|
2962
|
+
_disabledUrls = {};
|
|
2963
|
+
_disableAjaxTracking = false;
|
|
2964
|
+
_disableFetchTracking = true;
|
|
2965
|
+
_excludeRequestFromAutoTrackingPatterns = null;
|
|
2966
|
+
_addRequestContext = null;
|
|
2967
|
+
_evtNamespace = null;
|
|
2968
|
+
}
|
|
2969
|
+
function _populateDefaults(config) {
|
|
2970
|
+
var ctx = createProcessTelemetryContext(null, config, _self.core);
|
|
2971
|
+
_config = AjaxMonitor.getEmptyConfig();
|
|
2972
|
+
var defaultConfig = AjaxMonitor.getDefaultConfig();
|
|
2973
|
+
objForEachKey(defaultConfig, function (field, value) {
|
|
2974
|
+
_config[field] = ctx.getConfig(AjaxMonitor.identifier, field, value);
|
|
2975
|
+
});
|
|
2976
|
+
var distributedTracingMode = _config.distributedTracingMode;
|
|
2977
|
+
_enableRequestHeaderTracking = _config.enableRequestHeaderTracking;
|
|
2978
|
+
_enableAjaxErrorStatusText = _config.enableAjaxErrorStatusText;
|
|
2979
|
+
_enableAjaxPerfTracking = _config.enableAjaxPerfTracking;
|
|
2980
|
+
_maxAjaxCallsPerView = _config.maxAjaxCallsPerView;
|
|
2981
|
+
_enableResponseHeaderTracking = _config.enableResponseHeaderTracking;
|
|
2982
|
+
_excludeRequestFromAutoTrackingPatterns = _config.excludeRequestFromAutoTrackingPatterns;
|
|
2983
|
+
_addRequestContext = _config.addRequestContext;
|
|
2984
|
+
_isUsingAIHeaders = distributedTracingMode === 0 || distributedTracingMode === 1 ;
|
|
2985
|
+
_isUsingW3CHeaders = distributedTracingMode === 1 || distributedTracingMode === 2 ;
|
|
2986
|
+
if (_enableAjaxPerfTracking) {
|
|
2987
|
+
var iKey = config.instrumentationKey || "unkwn";
|
|
2988
|
+
if (iKey.length > 5) {
|
|
2989
|
+
_markPrefix = AJAX_MONITOR_PREFIX + iKey.substring(iKey.length - 5) + ".";
|
|
2990
|
+
}
|
|
2991
|
+
else {
|
|
2992
|
+
_markPrefix = AJAX_MONITOR_PREFIX + iKey + ".";
|
|
2993
|
+
}
|
|
2994
|
+
}
|
|
2995
|
+
_disableAjaxTracking = !!_config.disableAjaxTracking;
|
|
2996
|
+
_disableFetchTracking = !!_config.disableFetchTracking;
|
|
2997
|
+
}
|
|
2998
|
+
function _populateContext() {
|
|
2999
|
+
var propExt = _self.core.getPlugin(PropertiesPluginIdentifier);
|
|
3000
|
+
if (propExt) {
|
|
3001
|
+
_context = propExt.plugin.context;
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
2975
3004
|
function _canIncludeHeaders(header) {
|
|
2976
3005
|
var rlt = true;
|
|
2977
3006
|
if (header || _config.ignoreHeaders) {
|
|
@@ -2991,12 +3020,12 @@
|
|
|
2991
3020
|
}
|
|
2992
3021
|
var global = getGlobal();
|
|
2993
3022
|
var isPolyfill = fetch.polyfill;
|
|
2994
|
-
if (
|
|
3023
|
+
if (!_disableFetchTracking && !_fetchInitialized) {
|
|
2995
3024
|
_addHook(InstrumentFunc(global, strFetch, {
|
|
2996
3025
|
ns: _evtNamespace,
|
|
2997
3026
|
req: function (callDetails, input, init) {
|
|
2998
3027
|
var fetchData;
|
|
2999
|
-
if (_fetchInitialized &&
|
|
3028
|
+
if (!_disableFetchTracking && _fetchInitialized &&
|
|
3000
3029
|
!_isDisabledRequest(null, input, init) &&
|
|
3001
3030
|
!(isPolyfill && _xhrInitialized)) {
|
|
3002
3031
|
var ctx = callDetails.ctx();
|
|
@@ -3009,31 +3038,33 @@
|
|
|
3009
3038
|
}
|
|
3010
3039
|
},
|
|
3011
3040
|
rsp: function (callDetails, input) {
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3041
|
+
if (!_disableFetchTracking) {
|
|
3042
|
+
var fetchData_1 = callDetails.ctx().data;
|
|
3043
|
+
if (fetchData_1) {
|
|
3044
|
+
callDetails.rslt = callDetails.rslt.then(function (response) {
|
|
3045
|
+
_reportFetchMetrics(callDetails, (response || {}).status, input, response, fetchData_1, function () {
|
|
3046
|
+
var ajaxResponse = {
|
|
3047
|
+
statusText: response.statusText,
|
|
3048
|
+
headerMap: null,
|
|
3049
|
+
correlationContext: _getFetchCorrelationContext(response)
|
|
3050
|
+
};
|
|
3051
|
+
if (_enableResponseHeaderTracking) {
|
|
3052
|
+
var responseHeaderMap_1 = {};
|
|
3053
|
+
response.headers.forEach(function (value, name) {
|
|
3054
|
+
if (_canIncludeHeaders(name)) {
|
|
3055
|
+
responseHeaderMap_1[name] = value;
|
|
3056
|
+
}
|
|
3057
|
+
});
|
|
3058
|
+
ajaxResponse.headerMap = responseHeaderMap_1;
|
|
3059
|
+
}
|
|
3060
|
+
return ajaxResponse;
|
|
3061
|
+
});
|
|
3062
|
+
return response;
|
|
3063
|
+
})["catch"](function (reason) {
|
|
3064
|
+
_reportFetchMetrics(callDetails, 0, input, null, fetchData_1, null, { error: reason.message });
|
|
3065
|
+
throw reason;
|
|
3031
3066
|
});
|
|
3032
|
-
|
|
3033
|
-
})["catch"](function (reason) {
|
|
3034
|
-
_reportFetchMetrics(callDetails, 0, input, null, fetchData, null, { error: reason.message });
|
|
3035
|
-
throw reason;
|
|
3036
|
-
});
|
|
3067
|
+
}
|
|
3037
3068
|
}
|
|
3038
3069
|
},
|
|
3039
3070
|
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxOpen, "Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")
|
|
@@ -3056,17 +3087,19 @@
|
|
|
3056
3087
|
_addHook(InstrumentProto(target, funcName, callbacks));
|
|
3057
3088
|
}
|
|
3058
3089
|
function _instrumentXhr() {
|
|
3059
|
-
if (_supportsAjaxMonitoring(_self) && !_xhrInitialized) {
|
|
3090
|
+
if (_supportsAjaxMonitoring(_self) && !_disableAjaxTracking && !_xhrInitialized) {
|
|
3060
3091
|
_hookProto(XMLHttpRequest, "open", {
|
|
3061
3092
|
ns: _evtNamespace,
|
|
3062
3093
|
req: function (args, method, url, async) {
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
if (!
|
|
3067
|
-
|
|
3094
|
+
if (!_disableAjaxTracking) {
|
|
3095
|
+
var xhr = args.inst;
|
|
3096
|
+
var ajaxData = xhr[strAjaxData];
|
|
3097
|
+
if (!_isDisabledRequest(xhr, url) && _isMonitoredXhrInstance(xhr, true)) {
|
|
3098
|
+
if (!ajaxData || !ajaxData.xhrMonitoringState.openDone) {
|
|
3099
|
+
_openHandler(xhr, method, url, async);
|
|
3100
|
+
}
|
|
3101
|
+
_attachToOnReadyStateChange(xhr);
|
|
3068
3102
|
}
|
|
3069
|
-
_attachToOnReadyStateChange(xhr);
|
|
3070
3103
|
}
|
|
3071
3104
|
},
|
|
3072
3105
|
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxOpen, "Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")
|
|
@@ -3074,39 +3107,45 @@
|
|
|
3074
3107
|
_hookProto(XMLHttpRequest, "send", {
|
|
3075
3108
|
ns: _evtNamespace,
|
|
3076
3109
|
req: function (args, context) {
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3110
|
+
if (!_disableAjaxTracking) {
|
|
3111
|
+
var xhr = args.inst;
|
|
3112
|
+
var ajaxData = xhr[strAjaxData];
|
|
3113
|
+
if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState.sendDone) {
|
|
3114
|
+
_createMarkId("xhr", ajaxData);
|
|
3115
|
+
ajaxData.requestSentTime = dateTimeUtilsNow();
|
|
3116
|
+
_self.includeCorrelationHeaders(ajaxData, undefined, undefined, xhr);
|
|
3117
|
+
ajaxData.xhrMonitoringState.sendDone = true;
|
|
3118
|
+
}
|
|
3084
3119
|
}
|
|
3085
3120
|
},
|
|
3086
3121
|
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxSend, "Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")
|
|
3087
3122
|
});
|
|
3088
3123
|
_hookProto(XMLHttpRequest, "abort", {
|
|
3124
|
+
ns: _evtNamespace,
|
|
3089
3125
|
req: function (args) {
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
ajaxData.
|
|
3094
|
-
|
|
3126
|
+
if (!_disableAjaxTracking) {
|
|
3127
|
+
var xhr = args.inst;
|
|
3128
|
+
var ajaxData = xhr[strAjaxData];
|
|
3129
|
+
if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState.abortDone) {
|
|
3130
|
+
ajaxData.aborted = 1;
|
|
3131
|
+
ajaxData.xhrMonitoringState.abortDone = true;
|
|
3132
|
+
}
|
|
3095
3133
|
}
|
|
3096
3134
|
},
|
|
3097
3135
|
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxAbort, "Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")
|
|
3098
3136
|
});
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3137
|
+
_hookProto(XMLHttpRequest, "setRequestHeader", {
|
|
3138
|
+
ns: _evtNamespace,
|
|
3139
|
+
req: function (args, header, value) {
|
|
3140
|
+
if (!_disableAjaxTracking && _enableRequestHeaderTracking) {
|
|
3102
3141
|
var xhr = args.inst;
|
|
3103
3142
|
if (_isMonitoredXhrInstance(xhr) && _canIncludeHeaders(header)) {
|
|
3104
3143
|
xhr[strAjaxData].requestHeaders[header] = value;
|
|
3105
3144
|
}
|
|
3106
|
-
}
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
}
|
|
3145
|
+
}
|
|
3146
|
+
},
|
|
3147
|
+
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxSetRequestHeader, "Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")
|
|
3148
|
+
});
|
|
3110
3149
|
_xhrInitialized = true;
|
|
3111
3150
|
}
|
|
3112
3151
|
}
|