Skip to content

Commit f1028d3

Browse files
authored
Revert "feat!: capture all W3C fields in NavigationEvents (#494)" (#630)
1 parent f1ebe53 commit f1028d3

File tree

10 files changed

+513
-273
lines changed

10 files changed

+513
-273
lines changed

src/event-cache/__tests__/EventCache.integ.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ describe('EventCache tests', () => {
8484
allowCookies: false,
8585
sessionLengthSeconds: 0,
8686
sessionAttributes: {
87+
version: '2.0.0',
8788
domain: 'overridden.console.aws.amazon.com',
8889
browserLanguage: 'en-UK',
8990
browserName: 'Chrome',
Lines changed: 51 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,45 @@
11
{
2-
"$id": "com.amazon.rum.performance_navigation_timing",
2+
"$id": "com.amazon.rum.performance_navigation_event",
33
"$schema": "https://json-schema.org/draft/2020-12/schema",
4-
"title": "PerformanceNavigationTimingEvent",
4+
"title": "NavigationEvent",
55
"type": "object",
66
"properties": {
7-
"name": {
8-
"type": "string"
7+
"version": {
8+
"const": "1.0.0",
9+
"type": "string",
10+
"description": "Schema version."
911
},
10-
"entryType": {
11-
"const": "navigation",
12-
"type": "string"
12+
"initiatorType": {
13+
"type": "string",
14+
"enum": ["navigation", "route_change"]
15+
},
16+
"navigationType": {
17+
"description": "An unsigned short which indicates how the navigation to this page was done. Possible values are:TYPE_NAVIGATE (0), TYPE_RELOAD (1), TYPE_BACK_FORWARD (2), TYPE_RESERVED (255)",
18+
"type": "string",
19+
"enum": ["navigate", "reload", "back_forward", "reserved"]
1320
},
1421
"startTime": {
15-
"type": "number",
16-
"description": "StartTime value is always '0' for PerformanceNavigationTimingEvents created by the PerformanceAPI. However, non-W3C 'route_changes' created by RUM's polyfill for SinglePageApplications can have startTimes >= 0."
22+
"type": "number"
1723
},
18-
"duration": {
24+
"unloadEventStart": {
1925
"type": "number"
2026
},
21-
"initiatorType": {
22-
"type": "string",
23-
"enum": ["navigation", "route_change"],
24-
"description": "InitiatorType value is always 'navigation' for PerformanceNavigationTimingEvents created by the PerformanceAPI. However, RUM adds the non-W3C concept 'route_change' as a polyfill because the PerformanceAPI currently does not support Single Page Applications."
27+
"promptForUnload": {
28+
"type": "number"
2529
},
26-
"nextHopProtocol": {
27-
"type": "string"
30+
"redirectCount": {
31+
"type": "integer"
2832
},
29-
"workerStart": {
33+
"redirectStart": {
3034
"type": "number"
3135
},
32-
"redirectStart": {
36+
"redirectTime": {
37+
"type": "number"
38+
},
39+
"workerStart": {
3340
"type": "number"
3441
},
35-
"redirectEnd": {
42+
"workerTime": {
3643
"type": "number"
3744
},
3845
"fetchStart": {
@@ -41,68 +48,73 @@
4148
"domainLookupStart": {
4249
"type": "number"
4350
},
44-
"domainLookupEnd": {
51+
"dns": {
4552
"type": "number"
4653
},
54+
"nextHopProtocol": {
55+
"type": "string"
56+
},
4757
"connectStart": {
4858
"type": "number"
4959
},
50-
"connectEnd": {
60+
"connect": {
5161
"type": "number"
5262
},
5363
"secureConnectionStart": {
5464
"type": "number"
5565
},
66+
"tlsTime": {
67+
"type": "number"
68+
},
5669
"requestStart": {
5770
"type": "number"
5871
},
72+
"timeToFirstByte": {
73+
"type": "number"
74+
},
5975
"responseStart": {
6076
"type": "number"
6177
},
62-
"responseEnd": {
78+
"responseTime": {
6379
"type": "number"
6480
},
65-
"transferSize": {
81+
"domInteractive": {
6682
"type": "number"
6783
},
68-
"encodedBodySize": {
84+
"domContentLoadedEventStart": {
6985
"type": "number"
7086
},
71-
"decodedBodySize": {
87+
"domContentLoaded": {
7288
"type": "number"
7389
},
7490
"domComplete": {
7591
"type": "number"
7692
},
77-
"domContentLoadedEventEnd": {
93+
"domProcessingTime": {
7894
"type": "number"
7995
},
80-
"domContentLoadedEventStart": {
96+
"loadEventStart": {
8197
"type": "number"
8298
},
83-
"domInteractive": {
99+
"loadEventTime": {
84100
"type": "number"
85101
},
86-
"loadEventEnd": {
102+
"duration": {
87103
"type": "number"
88104
},
89-
"loadEventStart": {
105+
"headerSize": {
90106
"type": "number"
91107
},
92-
"redirectCount": {
93-
"type": "integer"
94-
},
95-
"type": {
96-
"type": "string",
97-
"enum": ["navigate", "reload", "back_forward", "prerender"]
108+
"transferSize": {
109+
"type": "number"
98110
},
99-
"unloadEventEnd": {
111+
"compressionRatio": {
100112
"type": "number"
101113
},
102-
"unloadEventStart": {
114+
"navigationTimingLevel": {
103115
"type": "number"
104116
}
105117
},
106118
"additionalProperties": false,
107-
"required": ["entryType", "startTime", "duration", "initiatorType"]
119+
"required": ["version", "initiatorType", "startTime", "duration"]
108120
}

src/orchestration/__tests__/Orchestration.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ jest.mock('../../utils/common-utils', () => {
2828
return {
2929
__esModule: true,
3030
...originalModule,
31-
isLCPSupported: jest.fn().mockReturnValue(true),
32-
isNavigationSupported: jest.fn().mockReturnValue(true)
31+
isLCPSupported: jest.fn().mockReturnValue(true)
3332
};
3433
});
3534

0 commit comments

Comments
 (0)