-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Add opt-out telemetry to the Chrome extension #7370
Conversation
ee29803
to
2f2f560
Compare
// Another hour passes and the request should not be rate-limited any more. | ||
window.Date.test_now_value += 1 * 36E5; | ||
telemetryScript.runInNewContext(window); | ||
// Only one request should be sent because of rate-limiting. |
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.
I'll remove this comment (copy-paste error).
Looks good from client side. A server functionality was not checked, but per IRC conversation installed locally extension also pings main server. Good to go after nits addressed.
|
Privacy policy: https://github.com/Rob--W/pdfjs-telemetry#privacy-policy Unit tests (offline): ``` node test/chromium/test-telemetry.js ``` Server tests (requires that Nginx is installed): ``` git clone https://github.com/Rob--W/pdfjs-telemetry.git cd pdfjs-telemetry/ python testserver.py TestHttp TestHttps ``` Integration test (extension + server): - Build the extension - Edit build/chromium/telemetry.js and remove the check for chrome.runtime.id. - Start Chrome (preferably a new profile): chromium --user-data-dir=/tmp/pdftest --no-first-run - Open chrome://net-internals#events - Visit chrome://extensions and enable Developer mode. - Load unpacked extension, select build/chromium. - Go to the chrome://net-internals tab and filter on pdfjs.robwu.nl. - Click on URL_REQUEST and verify that the server replied with 204. - Reload the extension. - Verify that chrome://net-internals did not contain a new log request.
2f2f560
to
724308c
Compare
Thank you for the patch |
Fix typo in telemetry.js, follow-up to #7370
This PR adds telemetry to the Chrome extension - see #7312. To make sure that this system behaves exactly as expected (i.e. not too much logging, and not too few logging), I've added an extensive set of unit tests at both the extension and the server. Just as a sanity check, I've also included a manual test at the bottom. I've successfully tested it in 51.0.2704.63 and 34.0.1847.137.
Privacy policy: https://github.com/Rob--W/pdfjs-telemetry#privacy-policy
Unit tests (offline):
Server tests (requires that Nginx is installed):
Integration test (extension + server):
chrome.runtime.id.
chromium --user-data-dir=/tmp/pdftest --no-first-run
/cc @timvandermeij
This change is