sql: add separate log channel for statements that fail with errors #141941
Labels
A-logging
In and around the logging infrastructure.
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
O-support
Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs
T-sql-queries
SQL Queries Team
It's occasionally useful to examine all statement executions that failed with an error. (Similar to examination of a dead letter queue to diagnose problems.) We have a couple ways to do this today, but all are painful:
sql.trace.log_statement_execute
orsql.log.all_statements.enabled
. This is a firehose and not suitable for production clusters.sql.log.slow_query.latency_threshold
and hope that some of the slow executions are also failures. This misses any failures under the threshold.sql.trace.stmt.enable_threshold
orsql.trace.txn.enable_threshold
. This is also not suitable for production clusters as it imposes a performance penalty on every query execution, and it might not necessarily find statement failures.It would be much more straightforward to create a log channel devoted to statement execution failures.
Jira issue: CRDB-48089
The text was updated successfully, but these errors were encountered: