cockroachdb / cockroachdb/cockroach

tracing: sampling in event logs for better coverage

Open
#100,790 0 comments 0 reactions 0 assignees View on GitHub
A-observability-inf C-enhancement O-support P-3 T-observability
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

There are limits to the number and size of logs that traces can collect (see #87539). When the recording exceeds the limits, it gets trimmed [#88414]. Currently it retains only a tail of events in the log.

Sometimes it is useful to see both the beginning and the ending of a span. For example, the span below has many identical events (individual `Get` evaluations), and was truncated to display only a tail of a 30s period. It would be useful though to see the head of this span, to make sure there wasn't a slow start / blockage before this long list of evaluations kicked off.

![trace](https://user-images.githubusercontent.com/3757441/230333404-78a8a93e-0bb6-4cea-93ff-b7d27e2fb500.png)

So, when trimming is necessary, maybe the sweet spot is in retaining both the head and the tail of the log, and removing events in the middle. More generally, the events in the middle can be sampled, to provide some coverage there too. If so, discontiguous parts of the log should be marked as such so that the engineer looking at it is not confused.

Jira issue: CRDB-26623

Epic CRDB-32402

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.