Description
Is your feature request related to a problem? Please describe.
Currently, when investigating SQL errors, it is difficult to determine the types of errors being returned to the client, without diving deep into debug.zip internals.
We already have a SQL Statement Errors
chart on the SQL dashboard of the DB Console. However, it only shows a total. This makes it hard to deduce the class of errors.
Describe the solution you'd like
Ideally, we'd be able to easily tell the class of errors that are being returned to the SQL client. This could be metrics, or logs.
The latter could be very verbose / expensive. Perhaps these could be gated behind a vmodule / sampling.
Having metrics per error code would also be pretty noisy. Maybe we can bucket different error codes together.
Additional context
This came up in the context of https://github.com/cockroachlabs/support/issues/2869.
Jira issue: CRDB-38026