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,
"jsonl"— newline-delimited JSON, one entry per line; suitable for
jq pipelines, and log aggregation
typealias ExportFormat = "har" | "jsonl"---
ExportConfig
Auto-export configuration for persisting recorded traffic to disk.
export {
path = "/tmp/proxy-traffic.har"
interval = 30.s
}| Field | Type | Default | Description |
|---|---|---|---|
path | String | (required) | Filesystem path for the export file. The file is created if it does |
format | ExportFormat | "har" | Output format for the export file. Default: "har". |
interval | Duration? | null | How 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 minimalrecording {} 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.
| Field | Type | Default | Description |
|---|---|---|---|
enabled | Boolean | true | Master toggle for traffic recording. When false, no traffic is |
maxEntries | UInt | 10_000 | Maximum number of entries retained in the in-memory ring buffer. |
maxBodyCapture | DataSize | 1.mb | Maximum body size captured per individual request or response. Bodies |
captureRequestHeaders | Boolean | true | Whether to include request headers in recorded entries. Disabling |
captureResponseHeaders | Boolean | true | Whether to include response headers in recorded entries. Disabling |
captureRequestBody | Boolean | false | Whether to capture request bodies. Significantly increases memory |
captureResponseBody | Boolean | false | Whether to capture response bodies. Significantly increases memory |
bodyContentTypes | Listing | new { | Content-Type patterns that are eligible for body capture. Uses glob |
excludeHosts | Listing | (empty) | Hostname patterns to exclude from recording even when a rule's |
export | ExportConfig? | null | Auto-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.
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.
---