fix log ingestion in Datadog (#1194)

This commit is contained in:
Darioush Jalali
2024-05-29 10:28:40 +00:00
committed by GitHub
parent 1d1c38e9bc
commit fe5af5c350
+2 -2
View File
@@ -156,9 +156,9 @@ func builtinReplace(_ []string, attr slog.Attr, logfmt bool) slog.Attr {
case slog.TimeKey:
if attr.Value.Kind() == slog.KindTime {
if logfmt {
return slog.String("t", attr.Value.Time().Format(timeFormat))
return slog.String("timestamp", attr.Value.Time().Format(timeFormat))
} else {
return slog.Attr{Key: "t", Value: attr.Value}
return slog.Attr{Key: "timestamp", Value: attr.Value}
}
}
case slog.LevelKey: