mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/protoparser/opentsdbhttp: increment errors counter on unmarshal errors
This is a follow-up for 149c0c4a6d
This commit is contained in:
parent
4d9501a0c4
commit
d21b1606a1
1 changed files with 1 additions and 0 deletions
|
@ -62,6 +62,7 @@ func ParseStream(req *http.Request, callback func(rows []Row) error) error {
|
||||||
defer putJSONParser(p)
|
defer putJSONParser(p)
|
||||||
v, err := p.ParseBytes(ctx.reqBuf.B)
|
v, err := p.ParseBytes(ctx.reqBuf.B)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
unmarshalErrors.Inc()
|
||||||
return fmt.Errorf("cannot parse HTTP OpenTSDB json: %w", err)
|
return fmt.Errorf("cannot parse HTTP OpenTSDB json: %w", err)
|
||||||
}
|
}
|
||||||
rs := getRows()
|
rs := getRows()
|
||||||
|
|
Loading…
Reference in a new issue