Skip to content

tracing: need separate API for clearing payload vs verbose logs #59145

@tbg

Description

@tbg

See #59103 (review)

We want to add a bool to (*Span).Structured that, if true, removes any visited payloads from their surrounding Span (thereby consuming them).
We also want an explicit (*Span).ResetRecording() that resets the Span's childrens. It should also reset the payloads, since by removing children it's already doing so at least partially.
Finally, enableRecording shouldn't clear anything any more.

Worth noting that while this is accommodating a usage pattern in SQL land that I consider problematic, namely that of reusing a span repeatedly, we are bound to have similar issues to do the fact that we use the local machine itself as the storage provider for the trace. Long-running traces can amass arbitrary amounts of data, and at some point data needs to be aged out. While ideally we will ultimately learn to budget properly (i.e, expire old data as new data comes in), this is a few steps out.

Metadata

Metadata

Assignees

Labels

A-kv-observabilityA-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