cockroachdb / cockroachdb/cockroach

sql: add low-overhead statement bundle option

Open
#106,422 3 comments 0 reactions 0 assignees View on GitHub
A-sql-debug-bundle A-sql-explain C-escalation-improvement E-quick-win O-support P-3 T-sql-queries ui-design-needed
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Activating a statement bundle diagnostics on a query fingerprint adds significant overhead to every sampled query. The majority of the overhead comes from verbose tracing, which allows us to include `trace.*` files in the bundle. Tracing must be configured for every sampled query, before we know if the query meets the latency threshold, because we only know the query latency when it is completed and we cannot retroactively collect tracing information.

It would be useful to have an option to collect a statement bundle without tracing files. These statement bundles would still be useful in debugging slow queries in many cases. Without tracing files, verbose tracing can be disabled, which would significantly reduce the overhead of statement bundle diagnostics on every query. Therefore, statement diagnostics could be enabled on a query fingerprint with much less chance of it significantly affecting query latency and application performance.

Jira issue: CRDB-29561
Epic CRDB-37757

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.