Skip to content

feat(replay): Add responseStatus, decodedBodySize to perf entries #7613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint + fix e2e test
  • Loading branch information
billyvg committed Mar 27, 2023
commit e2aa740ada94a17cf183d48889dc017f6648b99a
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,19 @@ export const ReplayRecordingData = [
description: expect.stringMatching(/http:\/\/localhost:3000\/static\/js\/main.(\w+).js/),
startTimestamp: expect.any(Number),
endTimestamp: expect.any(Number),
data: { size: expect.any(Number), encodedBodySize: expect.any(Number) },
data: {
decodedBodySize: expect.any(Number),
encodedBodySize: expect.any(Number),
duration: expect.any(Number),
domInteractive: expect.any(Number),
domContentLoadedEventEnd: expect.any(Number),
domContentLoadedEventStart: expect.any(Number),
loadEventStart: expect.any(Number),
loadEventEnd: expect.any(Number),
domComplete: expect.any(Number),
redirectCount: expect.any(Number),
size: expect.any(Number),
},
},
},
},
Expand Down
32 changes: 17 additions & 15 deletions packages/replay/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,24 @@ export type PaintData = undefined;

/**
* See https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming
*
* Note `navigation.push` will not have any data
*
* Note `navigation.push` will not have any data
*/
export type NavigationData = Partial<Pick<
PerformanceNavigationTiming,
| 'decodedBodySize'
| 'encodedBodySize'
| 'duration'
| 'domInteractive'
| 'domContentLoadedEventEnd'
| 'domContentLoadedEventStart'
| 'loadEventStart'
| 'loadEventEnd'
| 'domComplete'
| 'redirectCount'
>> & {
export type NavigationData = Partial<
Pick<
PerformanceNavigationTiming,
| 'decodedBodySize'
| 'encodedBodySize'
| 'duration'
| 'domInteractive'
| 'domContentLoadedEventEnd'
| 'domContentLoadedEventStart'
| 'loadEventStart'
| 'loadEventEnd'
| 'domComplete'
| 'redirectCount'
>
> & {
/**
* Transfer size of resource
*/
Expand Down