-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Remove Unnecessary Delay #25897
Remove Unnecessary Delay #25897
Conversation
💔 Build Failed |
For my own understanding, the delay you removed was originally needed when this was an opt-out decision, rather than an opt-in? I'm not terribly familiar with telemetry's history |
Correct. It was intended to give time for the end user to opt out. Now that it has been opt in, they have unlimited time, so an artificial delay is unnecessary. |
(The test failures in this are legitimate, but I haven't had time to fix them yet) |
I'm going to block this on #26575 and instead focus this PR on the tweaking to avoid sending in parallel. |
Sorry, I'm not sure how I missed this in my notifications! |
I merged #26575 so merge conflicts now need to be resolved |
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.
LGTM
Tested with Charles proxy and delaying the _stats
requests, to trigger overlaps in fetching the stats. This PR prevents parallel fetch calls happening on the page
This removes an unnecessary delay in the Telemetry code that caused the code to wait an extra minute before trying to send data per page load. This also adds logic so that the code will wait until any previous attempt to send telemetry causes follow-up attempts to wait until it has completed sending (in the unlikely event that it takes longer than a minute, we don't want to waste time / resources).
9e103d1
to
2d8417f
Compare
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
I rewrote the original tests to be unit tests, but could not run them locally (not really sure why), which was unfortunate as it created a lot of commit churn. |
This adds logic so that the code will wait until any previous attempt to send telemetry causes follow-up attempts to wait until it has completed sending (in the unlikely event that it takes longer than a minute, we don't want to waste time / resources).
6.x/6.7: 8b64e62 |
Summary
This removes an unnecessary delay in the Telemetry code that caused the code to wait an extra minute before trying to send data per page load.
This also adds logic so that the code will wait until any previous attempt to send telemetry causes follow-up attempts to wait until it has completed sending (in the unlikely event that it takes longer than a minute, we don't want to waste time / resources).
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.This was checked for cross-browser compatibility, including a check against IE11Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsUnit or functional tests were updated or added to match the most common scenariosThis was checked for keyboard-only and screenreader accessibilityFor maintainers
This includes a feature addition or change that requires a release note and was labeled appropriately