-
Notifications
You must be signed in to change notification settings - Fork 10
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(ecau): add ability to export debug logs and HTTP responses for bug reports #591
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportBase: 98.48% // Head: 98.25% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #591 +/- ##
==========================================
- Coverage 98.48% 98.25% -0.23%
==========================================
Files 58 65 +7
Lines 1386 1492 +106
Branches 221 238 +17
==========================================
+ Hits 1365 1466 +101
- Misses 13 16 +3
- Partials 8 10 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
/deploy-preview just to make sure deployments will still work |
This PR changes 3 built userscript(s):
|
feat(ecau): add ability to export debug logs and HTTP responses for bug reports (#591)
feat(ecau): add ability to export debug logs and HTTP responses for bug reports (#591)
feat(ecau): add ability to export debug logs and HTTP responses for bug reports (#591)
We'll need this functionality if we want to collect debug logs even though debug logging to the console is disabled.
We'll use this to attach a logging observer to log all network requests, and to attach a request recording that logs request options and responses for debugging information.
Creating separate recordings for the exact same requests was a bit wasteful here. There are probably other opportunities for reuse elsewhere in the test suite too.
54c8d9e
to
5335048
Compare
It's sometimes quite difficult to reproduce an ECAU issue, especially when it concerns specific providers. #521 and #547 (comment) come to mind. Moreover, we're doing some debug logging here and there, but those logs are not shown to the user, so we won't get them in bug reports.
These changes add a feature that enables users to download a log file for an ECAU run, including debug messages and provider responses. These could then be submitted alongside a bug report in case we can't reproduce an issue. When exporting the log, it also displays a warning about the domains in the recorded responses so that people don't accidentally leak user credentials that may be stored in the response.
We're also switching to a new request interface that unifies
fetch
andGM.xmlHttpRequest
, which was necessary to log the responses.