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
x/pkgsite: improve error reporting #44231
Comments
Change https://golang.org/cl/291489 mentions this issue: |
Change https://golang.org/cl/291490 mentions this issue: |
Change https://golang.org/cl/291491 mentions this issue: |
Change https://golang.org/cl/291492 mentions this issue: |
Change https://golang.org/cl/291549 mentions this issue: |
Change https://golang.org/cl/291550 mentions this issue: |
Use a header to communicate to the error-reporting middleware that an error report should not be sent. This can be used to address item (3) on the issue, duplicate error reporting. For golang/go#44231 Change-Id: I33e91fe6b7af39bf2a2221fe20b16100b956a9e6 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/291489 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Add StackError, an error with a stack trace. Add the WrapStack function to add one while wrapping. We can use these to capture a stack lower down for later reporting, when we have more context. For golang/go#44231 Change-Id: Ib00aa75daa46e60ced99bfa5f1fd65bb31828d01 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/291490 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Call the error reporting service when the frontend is about to serve an error. At this point we know the request and the error. If the error has a stack trace, add it. Use the newly added header to bypass the error-reporting middleware, avoiding duplicate reports. For golang/go#44231 Change-Id: I09bec6ffeccb1624d6378e614e1209f9630ab419 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/291491 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Add a stack trace when we wrap an error from the DB. These traces can be sent to the error reporting service. For golang/go#44231 Change-Id: I096cdec4e97a6dcb0b7eb2ccdb4c955e1a0f4ccd Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/291492 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Send errors from fetching to the error reporting service, bypassing the middleware. For golang/go#44231 Change-Id: Iafdfcfa9950dacf9bbef732f1ae5644edda6b384 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/291549 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org> Reviewed-by: Julie Qiu <julie@golang.org>
For golang/go#44231 Change-Id: Ia285ee6f2493180727198cf9a1684f8d32fe2e64 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/291550 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org> Reviewed-by: Julie Qiu <julie@golang.org>
We added stacks to errors, and moved the error-reporting call to a place where both the error and the request are available. There is potentially more incremental work to do, like adding stack traces along more paths, but this is essentially done. |
Currently, we call the GCP ErrorReporting API as middleware whenever we see a 5xx response. This has a couple of problems:
The text was updated successfully, but these errors were encountered: