diff --git a/logs/lokiwriter.go b/logs/lokiwriter.go index ed73595..bd48bd8 100644 --- a/logs/lokiwriter.go +++ b/logs/lokiwriter.go @@ -61,11 +61,11 @@ func (w *LokiWriter) Write(p []byte) (n int, err error) { for k,v := range(event){ if k != "level" && k != "time" && k != "message"{ - data := v.(map[string]string) - labels[k] = data["data"] + labels[k] = v.(string) } } + // Format the timestamp in nanoseconds timestamp := fmt.Sprintf("%d000000", time.Now().UnixNano()/int64(time.Millisecond))