Skip to content

Commit a62cd27

Browse files
committed
Fix NAP log regex
1 parent 52e3180 commit a62cd27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/collector/otel_collector_plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const (
3737
// 2024-11-16T17:19:24+00:00 ---> Nov 16 17:19:24
3838
timestampConversionExpression = `'EXPR(let timestamp = split(split(body, ">")[1], " ")[0]; ` +
3939
`let newTimestamp = ` +
40-
`timestamp matches "(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})([+-]\\d{2}:\\d{2}|Z)" ` +
40+
`timestamp matches "(\\d{4})-(\\d{2})-(0\\d{1})T(\\d{2}):(\\d{2}):(\\d{2})([+-]\\d{2}:\\d{2}|Z)" ` +
4141
`? (let utcTime = ` +
4242
`date(timestamp).UTC(); utcTime.Format("Jan 2 15:04:05")) : date(timestamp).Format("Jan 02 15:04:05"); ` +
4343
`split(body, ">")[0] + ">" + newTimestamp + " " + split(body, " ", 2)[1])'`

0 commit comments

Comments
 (0)