Add source file to glob's emitted events #18

Open
opened 2026-08-18 00:54:49 +00:00 by erik · 0 comments
Owner

Not all globbed files will be the same shape, so it will be useful for downstream stages to know from which file the event came from so they can handle accordingly. glob.rs:126 becomes:

let event = LogEvent::data(serde_json::json!({
    "payload": text,
    "path": path.display().to_string(),
}));

The next challenge will then be to figure out how best to communicate this metadata forward since plugins like parse-lines discards sibling fields. Use the Event metadata api?

Not all globbed files will be the same shape, so it will be useful for downstream stages to know from which file the event came from so they can handle accordingly. glob.rs:126 becomes: ```rust let event = LogEvent::data(serde_json::json!({ "payload": text, "path": path.display().to_string(), })); ``` The next challenge will then be to figure out how best to communicate this metadata forward since plugins like parse-lines discards sibling fields. Use the Event metadata api?
erik self-assigned this 2026-08-18 00:54:49 +00:00
Sign in to join this conversation.
No description provided.