Skip to main content

build_envelope

Function build_envelope 

Source
pub fn build_envelope(
    payload: &Value,
    error: &FaucetError,
    reason: DlqReason,
    sink_name: &str,
    pipeline_name: &str,
    row: &str,
    record_index: usize,
) -> Value
Expand description

Build a single DLQ envelope.

The schema is fixed; see the design spec for the rationale. payload is included verbatim — no truncation, no transformation. reason records which stage quarantined the row (as the closed-set DlqReason serde value) so tools like faucet dlq inspect / faucet dlq replay can group and filter without re-deriving it from the free-form error message. It is written as a top-level reason field alongside the structured error.