-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat: use events from PW for network data #372
feat: use events from PW for network data #372
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
expect(netinfo[1].timings.total).toBeGreaterThan(delayTime); | ||
}); | ||
|
||
describe('waterfall timing calculation', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a good reason to remove this? It seems helpful if for no other reason than to ensure that the data we send to heartbeat/uptime is consistent. Is that checked elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't do calculation in the Synthetics code anymore, It's as part of Playwright code.
}, | ||
http: { | ||
version: formatVersion(response?.protocol), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we remove the version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the PR description already
http.version data is not exposed, but we can add that as a follow up once PW adds support for it and we are not using it on the waterfall UI.
__tests__/plugins/network.test.ts
Outdated
expect(netinfo[0]).toMatchObject({ | ||
resourceSize: 10, | ||
transferSize: expect.any(Number), | ||
resourceSize: -1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for the change here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per the PR description
Bare uncompressed resource size is not exposed for each request instead we have header and body sizes for both request and responses.
Aren't we displaying queuing time in waterfal chart, if so, this seems like a breaking change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Do you have any suggestions for testing the feature? Can I run it with heartbeat to check for compatibility with waterfall?
Yeah we need to run it via HB to test this for compatibility
|
I wouldnt call it as breaking change, if its not sent to UI, it shouldn't show those timings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are expecting requestStartTime
and loadEndTime
to be chrome's special baseline in seconds value. It appears to have now been changed to epoch millis in this PR. This will require a change on the Kibana side to be compatible with this version of synthetics, unless you are able to convert those two values back to the way chrome was providing it.
I remember we were using this on the UI only for calculating the offset, Why does this have to be in a special format? I can surely workaround to not break the UI, but would like to know the reason so we can solve this in a better way to never break on the future iteration. |
We are using it for the offset, but before we use it we actually covert it to milliseconds. This allows accurately place the start of each request on the chart in milliseconds. So the code is expecting seconds to convert to milliseconds. |
@dominiqueclarke So if I can change the epochTime in Seconds then it should be good from the UI side? We dont need it to be in the chrome devtools monotonic time format? |
Yes, I believe that should work just fine. |
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loadEndTime: -1, | ||
responseReceivedTime: -1, | ||
response: null, | ||
resourceSize: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting it to 0 would solve it? I had a thought since 0 is a actual size and could be for cached resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes changing it to 0 would solve it. To be fair, we are displaying 0 values right now as --
, which may not be totally accurate, so perhaps we want to fix this on the UI side. The same is true for transfer size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, will revert it to zero. May be we can add a fix on the UI side in parallel. Do you mind creating an issue?
/test |
@dominiqueclarke Can we merge it now or do you still see issue with the Request/Response headers? |
Yep, looks good to me. |
…a-fleet-heartbeat-synthetics-e2e-tests * upstream/master: [jjbb] for scheduling e2e jobs (elastic#418) docs: release notes for beta.17 (elastic#415) 1.0.0-beta.17 feat: add --playwright-options (elastic#405) fix: ensure timestamps of events are inorder (elastic#413) fix: do not stash `.nvm` folder (elastic#414) deprecate suite-params option over params (elastic#406) fix: end timestamp should reflect duration (elastic#410) docs: release notes for 1.16.0 (elastic#403) 1.0.0-beta.16 fix: revert Playwright to 1.14.0 (elastic#402) docs: release notes for beta 15 (elastic#400) 1.0.0-beta.15 chore: update deps and fix lint issues (elastic#399) fix: handle page close during response event (elastic#398) chore: require node > 14 for usage (elastic#397) fix: fix megabytes to mbps (elastic#394) feat: enable trace as part of rich-events (elastic#387) feat: use events from PW for network data (elastic#372)
Missing data
http.version
data is not exposed, but we can add that as a follow up once PW adds support for it and we are not using it on the waterfall UI.