Skip to main content

build_loki_payload

Function build_loki_payload 

Source
fn build_loki_payload(entries: &[Value], labels: &Map<String, Value>) -> Value
Expand description

Builds the Loki push payload: one stream carrying labels, with one [ns_timestamp, json_line] value per entry. Timestamps are the current wall-clock time in nanoseconds (as a decimal string, per the Loki API). Factored out of the network path for unit testing.