Skip to content

Commit

Permalink
fix(json_v2): In case of invalid json, log messsage to debug log (inf…
Browse files Browse the repository at this point in the history
  • Loading branch information
vvvrrooomm authored Jan 12, 2023
1 parent a736f4d commit 82ec689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/parsers/json_v2/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (p *Parser) Parse(input []byte) ([]telegraf.Metric, error) {

// Only valid JSON is supported
if !gjson.Valid(string(input)) {
return nil, fmt.Errorf("invalid JSON provided, unable to parse")
return nil, fmt.Errorf("invalid JSON provided, unable to parse: %s", string(input))
}

var metrics []telegraf.Metric
Expand Down

0 comments on commit 82ec689

Please sign in to comment.