Recording Configuration Reference

Traffic recording configuration for the proxy inspector.

When recording is enabled, the proxy captures request/response metadata (and optionally bodies) in a bounded in-memory ring buffer. The Elide desktop inspector connects via the InspectorSettings WebSocket endpoint to display live traffic.

Recordings can also be exported to disk as HAR or JSONL files for offline analysis, sharing, or CI integration. See ExportConfig for auto-export settings.

Recording requires MITM to be enabled for HTTPS traffic — without it, the proxy can only capture metadata (host, timing) for TLS tunnels, not request/response content. See MitmConfig.

> This page is auto-generated from the PKL schema. See the guide for usage examples.

Types

ExportFormat

File format for exporting recorded traffic.

  • "har" — HTTP Archive v1.2, importable by Chrome DevTools, Firefox,
and most HTTP debugging tools
  • "jsonl" — newline-delimited JSON, one entry per line; suitable for
streaming ingestion, jq pipelines, and log aggregation
pkl
typealias ExportFormat = "har" | "jsonl"

---

ExportConfig

Auto-export configuration for persisting recorded traffic to disk.

pkl
export {
  path = "/tmp/proxy-traffic.har"
  interval = 30.s
}
FieldTypeDefaultDescription
pathString(required)Filesystem path for the export file. The file is created if it does
formatExportFormat"har"Output format for the export file. Default: "har".
intervalDuration?nullHow often to flush recorded traffic to disk automatically. When null,

path

Filesystem path for the export file. The file is created if it does not exist. Parent directories must already exist.

Write behavior depends on format:

  • "har" — the entire file is rewritten on each export cycle
  • "jsonl" — new entries are appended to the end of the file

format

Output format for the export file. Default: "har". See ExportFormat for available formats.

interval

How often to flush recorded traffic to disk automatically. When null, traffic is exported only on proxy shutdown. Setting a short interval (e.g., 30.s) ensures data is persisted even if the proxy is killed.

---

RecordingConfig

Controls what parts of proxied traffic are captured and how recordings are stored.

A minimal recording {} block enables metadata capture (URL, status, timing, headers) with a 10,000-entry ring buffer and no body capture. Enable captureRequestBody and captureResponseBody for full payload inspection.
FieldTypeDefaultDescription
enabledBooleantrueMaster toggle for traffic recording. When false, no traffic is
maxEntriesUInt10_000Maximum number of entries retained in the in-memory ring buffer.
maxBodyCaptureDataSize1.mbMaximum body size captured per individual request or response. Bodies
captureRequestHeadersBooleantrueWhether to include request headers in recorded entries. Disabling
captureResponseHeadersBooleantrueWhether to include response headers in recorded entries. Disabling
captureRequestBodyBooleanfalseWhether to capture request bodies. Significantly increases memory
captureResponseBodyBooleanfalseWhether to capture response bodies. Significantly increases memory
bodyContentTypesListingnew {Content-Type patterns that are eligible for body capture. Uses glob
excludeHostsListing(empty)Hostname patterns to exclude from recording even when a rule's
exportExportConfig?nullAuto-export configuration for persisting recordings to disk.

enabled

Master toggle for traffic recording. When false, no traffic is captured regardless of rule-level action = "record" settings. Default: true.

maxEntries

Maximum number of entries retained in the in-memory ring buffer. When the buffer is full, the oldest entries are evicted to make room for new ones. Default: 10_000.

maxBodyCapture

Maximum body size captured per individual request or response. Bodies exceeding this limit are truncated (the truncation is noted in the recording metadata). Set to 0 to disable body capture entirely, regardless of the captureRequestBody/captureResponseBody flags. Default: 1.mb.

captureRequestHeaders

Whether to include request headers in recorded entries. Disabling this reduces memory usage but limits debugging visibility. Default: true.

captureResponseHeaders

Whether to include response headers in recorded entries. Disabling this reduces memory usage but limits debugging visibility. Default: true.

captureRequestBody

Whether to capture request bodies. Significantly increases memory usage for high-traffic proxies. Only bodies whose Content-Type matches one of the bodyContentTypes patterns are captured; all others are skipped. Default: false.

captureResponseBody

Whether to capture response bodies. Significantly increases memory usage for high-traffic proxies. Only bodies whose Content-Type matches one of the bodyContentTypes patterns are captured; all others are skipped. Default: false.

bodyContentTypes

Content-Type patterns that are eligible for body capture. Uses glob syntax. Matched against the Content-Type header value, ignoring media type parameters (e.g., charset=utf-8). Binary types like image/* are excluded by default to avoid capturing large opaque payloads.

excludeHosts

Hostname patterns to exclude from recording even when a rule's action = "record" matches. Useful for suppressing high-volume background traffic (e.g., telemetry, health checks) that clutters the inspector.

pkl
excludeHosts { "*.telemetry.example.com"; "heartbeat.internal" }

export

Auto-export configuration for persisting recordings to disk. When null, recordings are held in memory only and lost when the proxy shuts down. See ExportConfig for format and interval options.

---