loki adjust

This commit is contained in:
mr
2026-03-18 10:28:31 +01:00
parent d4ac398cdb
commit 1a37a1b4aa

View File

@@ -59,13 +59,12 @@ func (w *LokiWriter) Write(p []byte) (n int, err error) {
// A bit unsafe since we don't know what could be stored in the event
// but we can't access this object once passed to the multilevel writter
for k,v := range(event){
for k, v := range event {
if k != "level" && k != "time" && k != "message" {
labels[k] = v.(string)
labels[k] = fmt.Sprintf("%v", v)
}
}
// Format the timestamp in nanoseconds
timestamp := fmt.Sprintf("%d000000", time.Now().UnixNano()/int64(time.Millisecond))