@microsoft/applicationinsights-dependencies-js 2.8.10-nightly.2301-28 → 2.8.10
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 +33 -24
- 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 +137 -36
- package/dist/applicationinsights-dependencies-js.api.md +2 -0
- package/dist/applicationinsights-dependencies-js.d.ts +11 -1
- package/dist/applicationinsights-dependencies-js.js +33 -24
- 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 +11 -1
- package/dist-esm/DependencyInitializer.js +1 -1
- package/dist-esm/DependencyListener.js +1 -1
- package/dist-esm/InternalConstants.js +1 -1
- package/dist-esm/__DynamicConstants.js +5 -4
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/ajax.js +16 -14
- package/dist-esm/ajax.js.map +1 -1
- package/dist-esm/ajaxRecord.js +18 -12
- package/dist-esm/ajaxRecord.js.map +1 -1
- package/dist-esm/ajaxUtils.js +1 -1
- package/dist-esm/applicationinsights-dependencies-js.js +1 -1
- package/package.json +61 -63
- package/src/DependencyInitializer.ts +5 -0
- package/src/DependencyListener.ts +7 -0
- package/src/__DynamicConstants.ts +4 -3
- package/src/ajax.ts +15 -13
- package/src/ajaxRecord.ts +17 -11
- package/types/DependencyInitializer.d.ts +4 -0
- package/types/DependencyListener.d.ts +6 -0
- package/types/__DynamicConstants.d.ts +1 -0
- package/types/tsdoc-metadata.json +1 -1
package/package.json
CHANGED
|
@@ -1,63 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@microsoft/applicationinsights-dependencies-js",
|
|
3
|
-
"version": "2.8.10
|
|
4
|
-
"description": "Microsoft Application Insights XHR dependencies plugin",
|
|
5
|
-
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
|
-
"author": "Microsoft Application Insights Team",
|
|
7
|
-
"main": "dist/applicationinsights-dependencies-js.js",
|
|
8
|
-
"module": "dist-esm/applicationinsights-dependencies-js.js",
|
|
9
|
-
"types": "types/applicationinsights-dependencies-js.d.ts",
|
|
10
|
-
"sideEffects": false,
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/microsoft/ApplicationInsights-JS/tree/master/extensions/applicationinsights-dependencies-js"
|
|
14
|
-
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "npm run build:esm && npm run build:browser && npm run sri && npm run dtsgen",
|
|
17
|
-
"build:esm": "grunt deps",
|
|
18
|
-
"build:browser": "rollup -c",
|
|
19
|
-
"rebuild": "npm run build",
|
|
20
|
-
"test": "grunt depstest",
|
|
21
|
-
"mintest": "grunt deps-mintest",
|
|
22
|
-
"lint": "tslint -p tsconfig.json",
|
|
23
|
-
"dtsgen": "api-extractor run --local && node ../../scripts/dtsgen.js \"Microsoft Application Insights XHR dependencies plugin\"",
|
|
24
|
-
"sri": "node ../../tools/subResourceIntegrity/generateIntegrityFile.js",
|
|
25
|
-
"ai-min": "grunt deps-min",
|
|
26
|
-
"ai-restore": "grunt deps-restore"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@
|
|
30
|
-
"@microsoft/
|
|
31
|
-
"@microsoft/applicationinsights-rollup-
|
|
32
|
-
"@microsoft/
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"grunt
|
|
37
|
-
"grunt-
|
|
38
|
-
"
|
|
39
|
-
"@nevware21/grunt-
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"@rollup/plugin-
|
|
44
|
-
"@rollup/plugin-
|
|
45
|
-
"rollup
|
|
46
|
-
"rollup": "^2.
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"@microsoft/
|
|
56
|
-
"@microsoft/applicationinsights-
|
|
57
|
-
"@microsoft/applicationinsights-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@microsoft/applicationinsights-dependencies-js",
|
|
3
|
+
"version": "2.8.10",
|
|
4
|
+
"description": "Microsoft Application Insights XHR dependencies plugin",
|
|
5
|
+
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
|
+
"author": "Microsoft Application Insights Team",
|
|
7
|
+
"main": "dist/applicationinsights-dependencies-js.js",
|
|
8
|
+
"module": "dist-esm/applicationinsights-dependencies-js.js",
|
|
9
|
+
"types": "types/applicationinsights-dependencies-js.d.ts",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/microsoft/ApplicationInsights-JS/tree/master/extensions/applicationinsights-dependencies-js"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "npm run build:esm && npm run build:browser && npm run sri && npm run dtsgen",
|
|
17
|
+
"build:esm": "grunt deps",
|
|
18
|
+
"build:browser": "rollup -c",
|
|
19
|
+
"rebuild": "npm run build",
|
|
20
|
+
"test": "grunt depstest",
|
|
21
|
+
"mintest": "grunt deps-mintest",
|
|
22
|
+
"lint": "tslint -p tsconfig.json",
|
|
23
|
+
"dtsgen": "api-extractor run --local && node ../../scripts/dtsgen.js \"Microsoft Application Insights XHR dependencies plugin\"",
|
|
24
|
+
"sri": "node ../../tools/subResourceIntegrity/generateIntegrityFile.js",
|
|
25
|
+
"ai-min": "grunt deps-min",
|
|
26
|
+
"ai-restore": "grunt deps-restore"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@nevware21/ts-async": "^0.1.0",
|
|
30
|
+
"@microsoft/ai-test-framework": "0.0.1",
|
|
31
|
+
"@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
|
|
32
|
+
"@microsoft/applicationinsights-rollup-es3": "1.1.3",
|
|
33
|
+
"@microsoft/api-extractor": "^7.18.1",
|
|
34
|
+
"typescript": "^4.9.3",
|
|
35
|
+
"tslib": "^2.0.0",
|
|
36
|
+
"grunt": "^1.5.3",
|
|
37
|
+
"grunt-cli": "^1.4.3",
|
|
38
|
+
"grunt-contrib-qunit": "^6.2.1",
|
|
39
|
+
"@nevware21/grunt-ts-plugin": "^0.4.3",
|
|
40
|
+
"@nevware21/grunt-eslint-ts": "^0.2.2",
|
|
41
|
+
"globby": "^11.0.0",
|
|
42
|
+
"magic-string": "^0.25.7",
|
|
43
|
+
"@rollup/plugin-commonjs": "^18.0.0",
|
|
44
|
+
"@rollup/plugin-node-resolve": "^11.2.1",
|
|
45
|
+
"@rollup/plugin-replace": "^2.3.3",
|
|
46
|
+
"rollup-plugin-cleanup": "^3.2.1",
|
|
47
|
+
"rollup": "^2.32.0",
|
|
48
|
+
"qunit": "^2.11.2",
|
|
49
|
+
"sinon": "^7.3.1"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"tslib": "*"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@microsoft/dynamicproto-js": "^1.1.7",
|
|
56
|
+
"@microsoft/applicationinsights-shims": "2.0.2",
|
|
57
|
+
"@microsoft/applicationinsights-core-js": "2.8.10",
|
|
58
|
+
"@microsoft/applicationinsights-common": "2.8.10"
|
|
59
|
+
},
|
|
60
|
+
"license": "MIT"
|
|
61
|
+
}
|
|
@@ -23,6 +23,11 @@ export interface IDependencyInitializerDetails {
|
|
|
23
23
|
* The context that the application can assigned via the dependency listener(s)
|
|
24
24
|
*/
|
|
25
25
|
context?: { [key: string]: any };
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* [Optional] A flag that indicates whether the client request was manually aborted by the `abort()`
|
|
29
|
+
*/
|
|
30
|
+
aborted?: boolean;
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
/**
|
|
@@ -51,6 +51,13 @@ export interface IDependencyListenerDetails {
|
|
|
51
51
|
* [Optional] Context that the application can assign that will also be passed to any dependency initializer
|
|
52
52
|
*/
|
|
53
53
|
context?: { [key: string]: any };
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* [Optional] A flag that indicates whether the client request was manually aborted by the `abort()`,
|
|
57
|
+
* as listeners are called just before the request is sent it is unlikely that an application would have
|
|
58
|
+
* called `abort` before `send` this is also available in the dependency initializer.
|
|
59
|
+
*/
|
|
60
|
+
aborted?: boolean;
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
/**
|
|
@@ -17,6 +17,7 @@ export const _DYN_TRACE_ID = "traceID"; // Count: 9
|
|
|
17
17
|
export const _DYN_SPAN_ID = "spanID"; // Count: 8
|
|
18
18
|
export const _DYN_TRACE_FLAGS = "traceFlags"; // Count: 13
|
|
19
19
|
export const _DYN_CONTEXT = "context"; // Count: 7
|
|
20
|
+
export const _DYN_ABORTED = "aborted"; // Count: 7
|
|
20
21
|
export const _DYN_TRACE_ID0 = "traceId"; // Count: 5
|
|
21
22
|
export const _DYN_SPAN_ID1 = "spanId"; // Count: 5
|
|
22
23
|
export const _DYN_CORE = "core"; // Count: 8
|
|
@@ -40,8 +41,8 @@ export const _DYN_EXCLUDE_REQUEST_FROM11 = "excludeRequestFromAutoTrackingPatter
|
|
|
40
41
|
export const _DYN_ADD_REQUEST_CONTEXT = "addRequestContext"; // Count: 2
|
|
41
42
|
export const _DYN_DISABLE_AJAX_TRACKIN12 = "disableAjaxTracking"; // Count: 2
|
|
42
43
|
export const _DYN_DISABLE_FETCH_TRACKI13 = "disableFetchTracking"; // Count: 2
|
|
43
|
-
export const _DYN_STATUS = "status"; // Count:
|
|
44
|
-
export const _DYN_STATUS_TEXT = "statusText"; // Count:
|
|
44
|
+
export const _DYN_STATUS = "status"; // Count: 11
|
|
45
|
+
export const _DYN_STATUS_TEXT = "statusText"; // Count: 9
|
|
45
46
|
export const _DYN_HEADER_MAP = "headerMap"; // Count: 8
|
|
46
47
|
export const _DYN_OPEN_DONE = "openDone"; // Count: 3
|
|
47
48
|
export const _DYN_SEND_DONE = "sendDone"; // Count: 3
|
|
@@ -52,7 +53,7 @@ export const _DYN_GET_TRACE_FLAGS = "getTraceFlags"; // Count: 3
|
|
|
52
53
|
export const _DYN_METHOD = "method"; // Count: 10
|
|
53
54
|
export const _DYN_ERROR_STATUS_TEXT = "errorStatusText"; // Count: 3
|
|
54
55
|
export const _DYN_STATE_CHANGE_ATTACHE14 = "stateChangeAttached"; // Count: 2
|
|
55
|
-
export const _DYN_RESPONSE_TEXT = "responseText"; // Count:
|
|
56
|
+
export const _DYN_RESPONSE_TEXT = "responseText"; // Count: 6
|
|
56
57
|
export const _DYN_RESPONSE_FINISHED_TI15 = "responseFinishedTime"; // Count: 7
|
|
57
58
|
export const _DYN__CREATE_TRACK_ITEM = "CreateTrackItem"; // Count: 3
|
|
58
59
|
export const _DYN_RESPONSE = "response"; // Count: 4
|
package/src/ajax.ts
CHANGED
|
@@ -23,7 +23,7 @@ import { IAjaxRecordResponse, ajaxRecord } from "./ajaxRecord";
|
|
|
23
23
|
const AJAX_MONITOR_PREFIX = "ai.ajxmn.";
|
|
24
24
|
const strDiagLog = "diagLog";
|
|
25
25
|
const strAjaxData = "ajaxData";
|
|
26
|
-
const
|
|
26
|
+
const STR_FETCH = "fetch";
|
|
27
27
|
|
|
28
28
|
const ERROR_HEADER = "Failed to monitor XMLHttpRequest";
|
|
29
29
|
const ERROR_PREFIX = ", monitoring data for this ajax call ";
|
|
@@ -47,11 +47,11 @@ function _supportsFetch(): (input: RequestInfo, init?: RequestInit) => Promise<R
|
|
|
47
47
|
if (!_global ||
|
|
48
48
|
isNullOrUndefined((_global as any).Request) ||
|
|
49
49
|
isNullOrUndefined((_global as any).Request[strPrototype]) ||
|
|
50
|
-
isNullOrUndefined(_global[
|
|
50
|
+
isNullOrUndefined(_global[STR_FETCH])) {
|
|
51
51
|
return null;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
return _global[
|
|
54
|
+
return _global[STR_FETCH];
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/**
|
|
@@ -196,7 +196,8 @@ function _processDependencyListeners(listeners: _IInternalDependencyHandler<Depe
|
|
|
196
196
|
traceId: ajaxData.traceID,
|
|
197
197
|
spanId: ajaxData.spanID,
|
|
198
198
|
traceFlags: ajaxData.traceFlags,
|
|
199
|
-
context: ajaxData.context || {}
|
|
199
|
+
context: ajaxData.context || {},
|
|
200
|
+
aborted: !!ajaxData.aborted
|
|
200
201
|
};
|
|
201
202
|
|
|
202
203
|
_processDependencyContainer(core, listeners, details, "listener");
|
|
@@ -559,7 +560,7 @@ export class AjaxMonitor extends BaseTelemetryPlugin implements IDependenciesPlu
|
|
|
559
560
|
let global = getGlobal();
|
|
560
561
|
let isPolyfill = (fetch as any).polyfill;
|
|
561
562
|
if (!_disableFetchTracking && !_fetchInitialized) {
|
|
562
|
-
_addHook(InstrumentFunc(global,
|
|
563
|
+
_addHook(InstrumentFunc(global, STR_FETCH, {
|
|
563
564
|
ns: _evtNamespace,
|
|
564
565
|
// Add request hook
|
|
565
566
|
req: (callDetails: IInstrumentCallDetails, input, init) => {
|
|
@@ -585,12 +586,12 @@ export class AjaxMonitor extends BaseTelemetryPlugin implements IDependenciesPlu
|
|
|
585
586
|
callDetails.rslt = callDetails.rslt.then((response: any) => {
|
|
586
587
|
_reportFetchMetrics(callDetails, (response||{}).status, input, response, fetchData, () => {
|
|
587
588
|
let ajaxResponse:IAjaxRecordResponse = {
|
|
588
|
-
statusText: response.statusText,
|
|
589
|
+
statusText: (response||{}).statusText,
|
|
589
590
|
headerMap: null,
|
|
590
591
|
correlationContext: _getFetchCorrelationContext(response)
|
|
591
592
|
};
|
|
592
593
|
|
|
593
|
-
if (_enableResponseHeaderTracking) {
|
|
594
|
+
if (_enableResponseHeaderTracking && response) {
|
|
594
595
|
const responseHeaderMap = {};
|
|
595
596
|
response.headers.forEach((value: string, name: string) => { // @skip-minify
|
|
596
597
|
if (_canIncludeHeaders(name)) {
|
|
@@ -607,7 +608,7 @@ export class AjaxMonitor extends BaseTelemetryPlugin implements IDependenciesPlu
|
|
|
607
608
|
return response;
|
|
608
609
|
})
|
|
609
610
|
.catch((reason: any) => {
|
|
610
|
-
_reportFetchMetrics(callDetails, 0, input, null, fetchData, null, { error: reason.message });
|
|
611
|
+
_reportFetchMetrics(callDetails, 0, input, null, fetchData, null, { error: reason.message || dumpObj(reason) });
|
|
611
612
|
throw reason;
|
|
612
613
|
});
|
|
613
614
|
}
|
|
@@ -626,7 +627,7 @@ export class AjaxMonitor extends BaseTelemetryPlugin implements IDependenciesPlu
|
|
|
626
627
|
// Note: Polyfill implementations that don't support the "poyyfill" tag are not supported
|
|
627
628
|
// the workaround is to add a polyfill property to your fetch implementation before initializing
|
|
628
629
|
// App Insights
|
|
629
|
-
_addHook(InstrumentFunc(global,
|
|
630
|
+
_addHook(InstrumentFunc(global, STR_FETCH, {
|
|
630
631
|
ns: _evtNamespace,
|
|
631
632
|
req: (callDetails: IInstrumentCallDetails, input, init) => {
|
|
632
633
|
// Just call so that we record any disabled URL
|
|
@@ -638,7 +639,7 @@ export class AjaxMonitor extends BaseTelemetryPlugin implements IDependenciesPlu
|
|
|
638
639
|
if (isPolyfill) {
|
|
639
640
|
// retag the instrumented fetch with the same polyfill settings this is mostly for testing
|
|
640
641
|
// But also supports multiple App Insights usages
|
|
641
|
-
(global[
|
|
642
|
+
(global[STR_FETCH] as any).polyfill = isPolyfill;
|
|
642
643
|
}
|
|
643
644
|
}
|
|
644
645
|
|
|
@@ -1097,7 +1098,7 @@ export class AjaxMonitor extends BaseTelemetryPlugin implements IDependenciesPlu
|
|
|
1097
1098
|
|
|
1098
1099
|
ajaxData.requestHeaders = requestHeaders;
|
|
1099
1100
|
|
|
1100
|
-
_createMarkId(
|
|
1101
|
+
_createMarkId(STR_FETCH, ajaxData);
|
|
1101
1102
|
|
|
1102
1103
|
return ajaxData;
|
|
1103
1104
|
}
|
|
@@ -1143,7 +1144,7 @@ export class AjaxMonitor extends BaseTelemetryPlugin implements IDependenciesPlu
|
|
|
1143
1144
|
ajaxData.responseFinishedTime = dateTimeUtilsNow();
|
|
1144
1145
|
ajaxData.status = status;
|
|
1145
1146
|
|
|
1146
|
-
_findPerfResourceEntry(
|
|
1147
|
+
_findPerfResourceEntry(STR_FETCH, ajaxData, () => {
|
|
1147
1148
|
const dependency = ajaxData.CreateTrackItem("Fetch", _enableRequestHeaderTracking, getResponse);
|
|
1148
1149
|
|
|
1149
1150
|
let properties;
|
|
@@ -1209,7 +1210,8 @@ export class AjaxMonitor extends BaseTelemetryPlugin implements IDependenciesPlu
|
|
|
1209
1210
|
item: dependency,
|
|
1210
1211
|
properties: properties,
|
|
1211
1212
|
sysProperties: systemProperties,
|
|
1212
|
-
context: ajaxData ? ajaxData.context : null
|
|
1213
|
+
context: ajaxData ? ajaxData.context : null,
|
|
1214
|
+
aborted: ajaxData ? !!ajaxData.aborted : false
|
|
1213
1215
|
};
|
|
1214
1216
|
|
|
1215
1217
|
result = _processDependencyContainer(core, initializers, details, "initializer");
|
package/src/ajaxRecord.ts
CHANGED
|
@@ -240,7 +240,7 @@ export class ajaxRecord {
|
|
|
240
240
|
|
|
241
241
|
public xhrMonitoringState: XHRMonitoringState;
|
|
242
242
|
|
|
243
|
-
// <summary>Determines whether or not JavaScript exception
|
|
243
|
+
// <summary>Determines whether or not JavaScript exception occurred in xhr.onreadystatechange code. 1 if occurred, otherwise 0.</summary>
|
|
244
244
|
public clientFailure: number;
|
|
245
245
|
|
|
246
246
|
/**
|
|
@@ -339,6 +339,11 @@ export class ajaxRecord {
|
|
|
339
339
|
[STR_PROPERTIES]: { HttpMethod: self.method }
|
|
340
340
|
} as IDependencyTelemetry;
|
|
341
341
|
|
|
342
|
+
let props = dependency[STR_PROPERTIES];
|
|
343
|
+
if (self.aborted) {
|
|
344
|
+
props.aborted = true;
|
|
345
|
+
}
|
|
346
|
+
|
|
342
347
|
if (self.requestSentTime) {
|
|
343
348
|
// Set the correct dependency start time
|
|
344
349
|
dependency.startTime = new Date();
|
|
@@ -350,7 +355,6 @@ export class ajaxRecord {
|
|
|
350
355
|
|
|
351
356
|
if (enableRequestHeaderTracking) {
|
|
352
357
|
if (objKeys(self.requestHeaders).length > 0) {
|
|
353
|
-
let props = dependency.properties = dependency.properties || {};
|
|
354
358
|
props.requestHeaders = self.requestHeaders;
|
|
355
359
|
}
|
|
356
360
|
}
|
|
@@ -367,19 +371,21 @@ export class ajaxRecord {
|
|
|
367
371
|
|
|
368
372
|
if (response.headerMap) {
|
|
369
373
|
if (objKeys(response.headerMap).length > 0) {
|
|
370
|
-
let props = dependency.properties = dependency.properties || {};
|
|
371
374
|
props.responseHeaders = response.headerMap;
|
|
372
375
|
}
|
|
373
376
|
}
|
|
374
377
|
|
|
375
|
-
if (self.errorStatusText
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
378
|
+
if (self.errorStatusText) {
|
|
379
|
+
if (self.status >= 400) {
|
|
380
|
+
const responseType = response.type;
|
|
381
|
+
if (responseType === "" || responseType === "text") {
|
|
382
|
+
props.responseText = response.responseText ? response.statusText + " - " + response[strResponseText] : response.statusText;
|
|
383
|
+
}
|
|
384
|
+
if (responseType === "json") {
|
|
385
|
+
props.responseText = response.response ? response.statusText + " - " + JSON.stringify(response.response) : response.statusText;
|
|
386
|
+
}
|
|
387
|
+
} else if (self.status === 0) {
|
|
388
|
+
props.responseText = response.statusText || "";
|
|
383
389
|
}
|
|
384
390
|
}
|
|
385
391
|
}
|
|
@@ -23,6 +23,10 @@ export interface IDependencyInitializerDetails {
|
|
|
23
23
|
context?: {
|
|
24
24
|
[key: string]: any;
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* [Optional] A flag that indicates whether the client request was manually aborted by the `abort()`
|
|
28
|
+
*/
|
|
29
|
+
aborted?: boolean;
|
|
26
30
|
}
|
|
27
31
|
/**
|
|
28
32
|
* The initializer function that will be called, if it returns false the event will be dropped and not reported
|
|
@@ -42,6 +42,12 @@ export interface IDependencyListenerDetails {
|
|
|
42
42
|
context?: {
|
|
43
43
|
[key: string]: any;
|
|
44
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* [Optional] A flag that indicates whether the client request was manually aborted by the `abort()`,
|
|
47
|
+
* as listeners are called just before the request is sent it is unlikely that an application would have
|
|
48
|
+
* called `abort` before `send` this is also available in the dependency initializer.
|
|
49
|
+
*/
|
|
50
|
+
aborted?: boolean;
|
|
45
51
|
}
|
|
46
52
|
/**
|
|
47
53
|
* The function that will get called when the ajax request is about to occur.
|
|
@@ -5,6 +5,7 @@ export declare const _DYN_TRACE_ID = "traceID";
|
|
|
5
5
|
export declare const _DYN_SPAN_ID = "spanID";
|
|
6
6
|
export declare const _DYN_TRACE_FLAGS = "traceFlags";
|
|
7
7
|
export declare const _DYN_CONTEXT = "context";
|
|
8
|
+
export declare const _DYN_ABORTED = "aborted";
|
|
8
9
|
export declare const _DYN_TRACE_ID0 = "traceId";
|
|
9
10
|
export declare const _DYN_SPAN_ID1 = "spanId";
|
|
10
11
|
export declare const _DYN_CORE = "core";
|