cockroach
cockroach copied to clipboard
pkg/util/tracing: introduce `trace.verbose.span.operation.regexp`
This patch introduces the trace.verbose.span.operation.regexp cluster
setting, which provides a surface for CRL employees debugging CRDB to
force certain tracing span operations to record in verbose mode via a
regular expression string. If the regexp matches a span's operation
name, that span will be forced into a verbose recording mode, capturing
all structured logs (recorded via RecordStructured) and events (Recorded
via Recordf) during the lifetime of the span.
We intentionally avoid release notes, as this setting is only meant for internal usage.
Release note: none
Epic: CRDB-35278
Addresses: https://github.com/cockroachdb/cockroach/issues/117624
Note: I'm going to follow up with some benchmarking, but wanted to get the implementation out asap to get feedback.
If benchmark results aren't good, we'll consider switching to a set of string operation names instead of a regular expression.
TFTR!
bors r=dhartunian