CompactorRedirects without the machinery

Configuration Reference

Use this reference to check exact environment names, defaults, and startup validation. Compactor reads configuration once at startup. Adapter-specific settings are validated only when that adapter is selected.

Core settings

VariableDefaultAccepted value and effect
COMPACTOR_BIND_ADDRESS0.0.0.0:8080Valid IP socket address; binding occurs after adapter startup validation.
COMPACTOR_SOURCE_TYPEjsonExactly json or http.
COMPACTOR_EVENT_SINK_TYPEjsonlExactly jsonl or http; selection is independent of the source.
COMPACTOR_TRUSTED_PROXIESemptyComma-separated IP addresses or CIDRs.
COMPACTOR_RECORD_CLIENT_ADDRESSEStrueExactly true or false.
COMPACTOR_MAX_CAPTURED_HEADER_VALUE_BYTES1024Positive integer per captured value.
COMPACTOR_MAX_CAPTURED_HEADER_TOTAL_BYTES4096Positive integer total captured-header budget.
COMPACTOR_REDIRECT_CACHE_TTL_SECONDS300Positive integer freshness lifetime for found redirects.
COMPACTOR_REDIRECT_CACHE_MAX_ENTRIES10000Positive integer resident-definition limit.

File adapters

VariableDefaultUsed when
COMPACTOR_REDIRECTS_FILE./redirects.jsonSource type is json; the entire file must validate before listening and on every authoritative resolution.
COMPACTOR_EVENTS_FILE./events.jsonlSink type is jsonl; its parent must exist and be writable.

Shared HTTP transport

VariableDefaultAccepted value and effect
COMPACTOR_HTTP_CONNECT_TIMEOUT_MS500Positive integer connection timeout, used when either HTTP adapter is selected.

One reusable client provides connection pooling, rustls certificate verification, and disabled redirect following. HTTP and HTTPS endpoint schemes are accepted; selected plaintext endpoints produce a startup warning.

HTTP source

These values apply only when COMPACTOR_SOURCE_TYPE=http.

VariableDefaultAccepted value and effect
COMPACTOR_HTTP_SOURCE_URLnoneRequired absolute HTTP(S) URL without user information, fragment, or an existing url query parameter.
COMPACTOR_HTTP_SOURCE_REQUEST_TIMEOUT_MS1500Positive integer total lookup timeout.
COMPACTOR_HTTP_SOURCE_MAX_RESPONSE_BYTES65536Positive integer response limit, enforced incrementally. Encoded responses are rejected.
COMPACTOR_HTTP_SOURCE_BEARER_TOKENnoneNon-empty bearer credential. Mutually exclusive with _FILE.
COMPACTOR_HTTP_SOURCE_BEARER_TOKEN_FILEnoneToken file path. One trailing LF or CRLF is removed.
COMPACTOR_HTTP_SOURCE_STATIC_HEADERS_JSON{}JSON object whose values are strings.

HTTP event sink

These values apply only when COMPACTOR_EVENT_SINK_TYPE=http.

VariableDefaultAccepted value and effect
COMPACTOR_HTTP_EVENT_SINK_URLnoneRequired absolute HTTP(S) URL without user information or fragment.
COMPACTOR_HTTP_EVENT_SINK_REQUEST_TIMEOUT_MS1500Positive integer total POST timeout.
COMPACTOR_HTTP_EVENT_SINK_BEARER_TOKENnoneNon-empty bearer credential. Mutually exclusive with _FILE.
COMPACTOR_HTTP_EVENT_SINK_BEARER_TOKEN_FILEnoneToken file path. One trailing LF or CRLF is removed.
COMPACTOR_HTTP_EVENT_SINK_STATIC_HEADERS_JSON{}JSON object whose values are strings.

Static headers cannot override Host, Content-Length, Connection, Transfer-Encoding, TE, Trailer, Upgrade, Proxy-Authorization, or each adapter's protocol headers. A configured bearer token also reserves Authorization; otherwise a static authorization header may implement another fixed scheme. Credential values never appear in formatted configuration or adapter errors.

RUST_LOG controls structured log filtering and defaults to info:

RUST_LOG=compactor=debug cargo run

Startup does not contact HTTP endpoints. It validates selected configuration, builds one shared client when needed, opens selected files, then binds. /healthz is local and dependency-free. Environment values and token files require restart to reload; JSON redirect content is reread according to runtime cache behavior.

See Configure HTTP adapters, HTTP adapter protocol, and Configure the JSON redirect source.