From 21f15cb3238be9b241c1b87140ef9151c2f52efb Mon Sep 17 00:00:00 2001 From: Nikhil Sinha Date: Sun, 16 Mar 2025 23:21:15 -0400 Subject: [PATCH 1/2] add time field names to the list add below field names to the list ``` "time","date","timestamp","created","received","ingested", "collected","start","end","event","log","ts", "dt" ``` this list help catch most standard timestamp field names commonly used across various systems help transform the data type to TimeStamp --- src/event/format/mod.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/event/format/mod.rs b/src/event/format/mod.rs index 158951d3b..d3f017ed9 100644 --- a/src/event/format/mod.rs +++ b/src/event/format/mod.rs @@ -40,7 +40,21 @@ use super::{Event, DEFAULT_TIMESTAMP_KEY}; pub mod json; -static TIME_FIELD_NAME_PARTS: [&str; 2] = ["time", "date"]; +static TIME_FIELD_NAME_PARTS: [&str; 13] = [ + "time", + "date", + "timestamp", + "created", + "received", + "ingested", + "collected", + "start", + "end", + "event", + "log", + "ts", + "dt", +]; type EventSchema = Vec>; /// Source of the logs, used to perform special processing for certain sources From 8c09347a58d56a3087bfa68c58671f9577ff8d36 Mon Sep 17 00:00:00 2001 From: Nikhil Sinha <131262146+nikhilsinhaparseable@users.noreply.github.com> Date: Tue, 18 Mar 2025 12:29:28 +0530 Subject: [PATCH 2/2] remove event and log from list Signed-off-by: Nikhil Sinha <131262146+nikhilsinhaparseable@users.noreply.github.com> --- src/event/format/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/event/format/mod.rs b/src/event/format/mod.rs index d3f017ed9..58c35fc79 100644 --- a/src/event/format/mod.rs +++ b/src/event/format/mod.rs @@ -40,7 +40,7 @@ use super::{Event, DEFAULT_TIMESTAMP_KEY}; pub mod json; -static TIME_FIELD_NAME_PARTS: [&str; 13] = [ +static TIME_FIELD_NAME_PARTS: [&str; 11] = [ "time", "date", "timestamp", @@ -50,8 +50,6 @@ static TIME_FIELD_NAME_PARTS: [&str; 13] = [ "collected", "start", "end", - "event", - "log", "ts", "dt", ];