From d21b1606a14fe051bcbd318d83e3709c46864797 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 13 Nov 2020 13:22:00 +0200 Subject: [PATCH] lib/protoparser/opentsdbhttp: increment errors counter on unmarshal errors This is a follow-up for 149c0c4a6d55e1d589f01a94b20d295ccd125250 --- lib/protoparser/opentsdbhttp/streamparser.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/protoparser/opentsdbhttp/streamparser.go b/lib/protoparser/opentsdbhttp/streamparser.go index 3eedef67d7..ad2d87dd88 100644 --- a/lib/protoparser/opentsdbhttp/streamparser.go +++ b/lib/protoparser/opentsdbhttp/streamparser.go @@ -62,6 +62,7 @@ func ParseStream(req *http.Request, callback func(rows []Row) error) error { defer putJSONParser(p) v, err := p.ParseBytes(ctx.reqBuf.B) if err != nil { + unmarshalErrors.Inc() return fmt.Errorf("cannot parse HTTP OpenTSDB json: %w", err) } rs := getRows()