Full-fidelity traffic capture (tenant-agnostic).
A capture proxy forwards each request to the upstream while recording the raw
request and response to a durable stream, so a replayer can later apply that
stream to another cluster (the OpenSearch Migration Assistant capture proxy).
This crate is the seam: [Capture] receives each exchange; a queue writer
(the osproxy-kafka crate), a file recorder, or the in-memory
[MemoryCapture] implement it. It pulls in no broker dependency, so the seam
is implementable from a leaf crate without dragging a Kafka client into the
default build.
This is not the shape-only telemetry. Everything else osproxy records is
shapes/ids/names and safe to expose by construction. A capture record carries
the raw bodies and header values, tenant data, and any credential a
redaction layer did not strip. The capture stream is a privileged channel:
secure it (encryption, access control), and enable it deliberately, never by
default. Redaction is composed in via [RedactingCapture] rather than baked
into every recorder.