telemetry(openobserve): remove trailing newline from log messages

This commit is contained in:
Tigor Hutasuhut 2024-05-23 22:47:34 +07:00
parent 32fea20476
commit d44185b665

View file

@ -54,6 +54,9 @@ func (sl *OpenObserveHandler) Handle(ctx context.Context, record slog.Record) er
if b[len(b)-1] == ',' { if b[len(b)-1] == ',' {
b = b[:len(b)-1] b = b[:len(b)-1]
} }
if b[len(b)-1] == '\n' {
b = b[:len(b)-1]
}
b = append(b, ']') b = append(b, ']')
sl.semaphore <- struct{}{} sl.semaphore <- struct{}{}
go func() { go func() {