cockroachdb / cockroachdb/cockroach

sql,obs: metrics / logs that break down SQL errors by group or type

Open
#122,686 6 comments 1 reaction 0 assignees View on GitHub
A-sql-console-general A-sql-observability C-enhancement E-starter O-support P-3 T-sql-foundations
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

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.

[Another (internal) thread.](https://cockroachlabs.slack.com/archives/C06PEGL22UX/p1713377268023889?thread_ts=1713376763.344529&cid=C06PEGL22UX)

Jira issue: CRDB-38026

Epic CRDB-380

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.