cockroachdb / cockroachdb/cockroach
tracing: important bits are dropped from the recorded span with many descendant spans
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Here is a stmt bundle collected on TPCH Q7 on a single node
[stmt-bundle-859275659091771393.zip](https://github.com/cockroachdb/cockroach/files/11305664/stmt-bundle-859275659091771393.zip)
Here is what we see for `JoinReader/7` on the distsql diagram:

Note that how it has 0 KV bytes read, 0 KV gRPC calls, and 0 MVCC steps which doesn't make sense (given that we did look up a bunch of rows). If we examine the logs, we do see that the streamer performed 48 KV gRPC calls.

I believe the problem is that we cap the recording to have at most 1000 spans

so we end up dropping spans that contained the execution stats metadata.
Andrei did bunch of work in #88414 to improve things, but as this example shows, there is still more improvements that we need to do.
Jira issue: CRDB-27279
Contributor guide
Assessment
This issue has not been assessed yet.