cockroachdb / cockroachdb/cockroach

logging: extend the log format for "redacted" logs to measure the amount of data redacted out

Open
#104,013 0 comments 0 reactions 0 assignees View on GitHub
A-logging A-observability-inf C-enhancement T-supportability
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Is your feature request related to a problem? Please describe.**

We want to report on "overly redacted" log lines. To do so we want to quantify how much data is being redacted out.

Currently the `Redact()` function replaces arbitrary amounts of data by a fixed-length redaction marker, and thus "forgets" the size of the original data.

We would like to annotate the result of redaction with some measurement of "how much" was redacted out.

**Describe the solution you'd like**

This can be done in a variety of ways:

- inside the `Redact` function itself. The drawback here is that if we indicate _per field_ how much data is redacted out, we might disclose some PII (data sizes form an information side channel)
- inside the `log` package, to report a combined ratio for an entire log entry "redacted / not redacted"

Jira issue: CRDB-28310

Epic CRDB-21266

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.