Binary body capture
How the Node.js SDK detects binary bodies, why capture_binary is off by default, and how captured binary bodies are uploaded as multipart parts, stored and counted against your storage.
A body is binary when its content type says so (images, audio, video, archives, application/octet-stream and so on) or, when the type does not decide, when its bytes are not valid UTF-8.
Default: metadata only
capture_binary is false by default. For binary bodies the record contains only metadata: size and content type. In the app, the body view shows an information card (“Binary body not captured”) with the size and the type.
Turning it on
create_inspector({
server_key,
capture_binary: true,
max_binary_bytes: 5 * 1024 * 1024, // default 10 MiB
});With capture_binary: true, binary bodies are not embedded in the JSON. They are sent in the same HTTP request as the batch, as separate raw multipart parts, and stored in object storage. The app previews images and offers other files as a download through a short-lived signed address.
Things to know:
- Binary bodies above
max_binary_bytesare not uploaded. Only their metadata is sent. The record says why (too_large). - Binary bodies count toward your plan’s storage. They are deleted by retention, “Clear requests” and when you delete the environment, like all request data.
- Streaming bodies and
FormDatacannot be read without consuming them; they are recorded as metadata only (stream). - Binary bodies are the first thing the SDK drops when it has to shed load. The app then shows how many bodies were skipped.
- MCP never returns binary bodies.
describe_bodyandget_requestreport their metadata only. - Binary bodies are not searchable.
For the exact record format see the wire format.