"memory exceeds quota" log better to be formatted to JSON #10870
Open
Description
When the memory threshold is reached, a "memory exceeds quota" log is printed:
40 // Action logs a warning only once when memory usage exceeds memory quota.
41 func (a *LogOnExceed) Action(t *Tracker) {
42 a.mutex.Lock()
43 defer a.mutex.Unlock()
44 if !a.acted {
45 a.acted = true
46 logutil.Logger(context.Background()).Warn("memory exceeds quota",
47 zap.Error(errMemExceedThreshold.GenWithStackByArgs(t.label, t.BytesConsumed(), t.bytesLimit, t.String())))
48 }
49 }
If we print the tracker tree in JSON format, we can parse and read it easier.
Activity