From 8c33ba537abaa0b5e26dbdc32aca3da281cf830d Mon Sep 17 00:00:00 2001 From: Hui Wang Date: Wed, 28 Feb 2024 22:33:08 +0800 Subject: [PATCH] chore: add actual request size in error message (#5889) --- lib/protoparser/promremotewrite/stream/streamparser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/protoparser/promremotewrite/stream/streamparser.go b/lib/protoparser/promremotewrite/stream/streamparser.go index 347a63217..546c8c0f2 100644 --- a/lib/protoparser/promremotewrite/stream/streamparser.go +++ b/lib/protoparser/promremotewrite/stream/streamparser.go @@ -110,7 +110,7 @@ func (ctx *pushCtx) Read() error { } if reqLen > int64(maxInsertRequestSize.N) { readErrors.Inc() - return fmt.Errorf("too big packed request; mustn't exceed -maxInsertRequestSize=%d bytes", maxInsertRequestSize.N) + return fmt.Errorf("too big packed request; mustn't exceed -maxInsertRequestSize=%d bytes; got %d bytes", maxInsertRequestSize.N, reqLen) } return nil }