-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql,tracing: introduce crdb_internal.cluster_inflight_traces
This change adds a new indexed, virtual table `crdb_internal.cluster_inflight_traces`. This table surfaces cluster wide inflight traces for the trace_id specified via an index constraint. Each row in the virtual table corresponds to a `tracing.Recording` on a particular node for the given trace ID. A `tracing.Recording` is the trace of a single operation rooted at a root span on that node. Under the hood, the virtual table contacts all "live" nodes in the cluster via the trace collector which streams back a recording at a time. The table has 3 additional columns that surface the raw JSON, string, and JaegarJSON represenation of the recording. These formats are what we dump in a stmt bundle as well, and have been considered the best way to consume traces. This table is not meant to be consumed directly via the SQL shell but will have CLI wrapper built on top of it that will assimilate and write the traces to files. Simliar to how we dump a stmt bundle. This change also tweaks some of the recording->string methods to include StructuredRecords. Release note (sql change): adds a virtual table `crdb_internal.cluster_inflight_traces` which surfaces cluster wide inflight traces for the trace_id specified via an index constraint. The output of this table is not appropriate to consume over a SQL connection; follow up changes will add CLI wrappers to make the interaction more user friendly.
- Loading branch information
1 parent
3b8b689
commit 2a9a5ee
Showing
24 changed files
with
513 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.