diff --git a/internal/collector/otel_collector_plugin.go b/internal/collector/otel_collector_plugin.go index e41a66a4d..18c101818 100644 --- a/internal/collector/otel_collector_plugin.go +++ b/internal/collector/otel_collector_plugin.go @@ -37,7 +37,7 @@ const ( // 2024-11-16T17:19:24+00:00 ---> Nov 16 17:19:24 timestampConversionExpression = `'EXPR(let timestamp = split(split(body, ">")[1], " ")[0]; ` + `let newTimestamp = ` + - `timestamp matches "(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})([+-]\\d{2}:\\d{2}|Z)" ` + + `timestamp matches "(\\d{4})-(\\d{2})-(0\\d{1})T(\\d{2}):(\\d{2}):(\\d{2})([+-]\\d{2}:\\d{2}|Z)" ` + `? (let utcTime = ` + `date(timestamp).UTC(); utcTime.Format("Jan 2 15:04:05")) : date(timestamp).Format("Jan 02 15:04:05"); ` + `split(body, ">")[0] + ">" + newTimestamp + " " + split(body, " ", 2)[1])'`