Skip to content

sql: expose always-on tracing inflight registry using vtable and builtins #55733

@tbg

Description

@tbg

Is your feature request related to a problem? Please describe.
As part of always-on tracing, a node-local registry of inflight operations will be introduced (#55592). This registry would be most useful if it could be queried from SQL.

This would improve our troubleshooting story as we could filter on long-running KV trace spans in that table to easily detect hanging operations (unavailable range, heavy contention) in a self-service fashion.

Describe the solution you'd like
Introduce a virtual table crdb_internal.tracing_inflight (big question mark on the name) that pulls the node-local registry from all nodes in the cluster.

Add a view on that table that also translate (where possible) KV txn id -> SQL txn ID to allow filtering efficiently.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

Labels

A-kv-observabilityA-sql-observabilityRelated to observability of the SQL layerA-tracingRelating to tracing in CockroachDB.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions