cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

pkg/util/tracing: introduce `trace.verbose.span.operation.regexp`

Open abarganier opened this issue 1 year ago • 2 comments

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

abarganier avatar Feb 08 '24 22:02 abarganier

This change is Reviewable

cockroach-teamcity avatar Feb 08 '24 22:02 cockroach-teamcity

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.

abarganier avatar Feb 08 '24 22:02 abarganier

TFTR!

bors r=dhartunian

abarganier avatar Feb 27 '24 15:02 abarganier

Build succeeded:

craig[bot] avatar Feb 27 '24 16:02 craig[bot]