-
Story
-
Resolution: Won't Fix
-
Major
To enable better tracing of errors in blueocean, client side web console errors need to be collected and reported, via the server, to the support core plugin.
In scope:
- Trap all js errors on the client side
- Publish errors to server side endpoint (jenkins under /blue/rest)
- Server endpoint /errors to collect all error messages
- A support core "Component" to publish client side logs/data to their own file as needed (similar to browser.md now)
- Capture additional information (like headers/response payloads) for failures and publish them to server side endpoint
Nice to have scope:
- Client side component may not need be blueocean generic - if possible make it work with classic
- Server side collection point may best live outside of blueocean if possible
- support-core component may actually be able to be contributed to the support core plugin itself, meaning that there is no blueocean specific code in all this
The support core plugin to report on things: https://wiki.jenkins-ci.org/display/JENKINS/Support+Core+Plugin
Background and research so far
Some interesting reading: http://openmymind.net/2012/4/4/You-Really-Should-Log-Client-Side-Error/
On reading what is out there for this, it really is quite simple. window.onerror now contains santised stacktraces as well as the error (if they help) so there is no real need for libraries. Many pay for services out there (rollbar is used for the dogfood instance, as an example) but this is probably best done without libs.
onerror now has stacktraces:
http://stackoverflow.com/questions/17687410/when-will-proper-stack-traces-be-provided-on-window-onerror-function
NOTE: split this into server/client components if it makes sense for implementation
There may be different errors we want to trap depending on the context: eg general unhandled errors, but also error reponses returned to fetch could be treated differently