pub struct LogShipCfg {
pub enabled: bool,
pub url: String,
pub headers: Vec<(String, String)>,
pub batch: usize,
pub interval_secs: u64,
pub queue_size: usize,
}Expand description
[log.ship] — stream the access log off the box to a collector.
The edge writes one structured line per request to stdout and, until this existed, nowhere else: an operator running a fleet had to collect logs per box with whatever their platform provided.
Any collector that accepts an NDJSON POST works — Vector, Loki, Splunk HEC, Datadog, an S3
writer, your own receiver. One wire shape rather than an integration per vendor, matching the
control plane’s [audit.ship].
This is best-effort, and that is deliberate. [audit.ship] is at-least-once with a cursor
because the audit trail is evidence. Access logs are telemetry at three to five orders of
magnitude more volume, and guaranteeing delivery would need an unbounded on-box buffer — whose
failure mode is that a collector outage takes down the proxy. Records are dropped when the queue
fills, and every drop is counted (edgeguard_logship_dropped_total).
Fields§
§enabled: bool§url: StringCollector URL. Empty disables shipping regardless of enabled.
headers: Vec<(String, String)>Extra headers, typically the collector’s API key: Authorization: Splunk <token>,
DD-API-KEY: <key>. A list of pairs rather than a map so the order is stable in config.
batch: usizeRecords per POST.
interval_secs: u64Flush a partial batch after this many seconds, so a low-traffic edge does not hold its last records indefinitely — a gap in the collector looks exactly like an outage.
queue_size: usizeIn-memory queue between the request path and the shipper. This is the bound: past it, records are dropped rather than the request path blocking.
10k at the measured request rates is a few seconds of buffer, which covers a collector restart and not a collector outage. Raising it trades memory for a longer outage tolerated; it does not make delivery guaranteed, and nothing here should be read as if it did.
Trait Implementations§
Source§impl Clone for LogShipCfg
impl Clone for LogShipCfg
Source§fn clone(&self) -> LogShipCfg
fn clone(&self) -> LogShipCfg
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more