Like the title suggests, I'm wondering how to populate the response code column in the GCP StackDriver ErrorReporting UI. Attached a screenshot for clarification.
I'm using Golang and the cloud.google.com/go/errorreporting
package to report custom errors, with this following code.
client.Report(errorreporting.Entry{
User: username,
Error: err,
})
I know there's an option to attach a Req
field, but after reading the errorreporting
source code, it's not clear how that would work. It looks like the source code doesn't actually read the response status code from the request object.
Any pointers appreciated.