-
Notifications
You must be signed in to change notification settings - Fork 4.1k
tracing: need separate API for clearing payload vs verbose logs #59145
Description
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.