Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Commit

Permalink
When updating a metric value for a distribution always return after p…
Browse files Browse the repository at this point in the history
…arsing the distribution value.

For formats that are sending all the values as a list current behavior will update the value but will log an error when trying to parse it as value. For distribution values with "dist" is a double counting bug (every parsed value is added twice).

PiperOrigin-RevId: 286751909
  • Loading branch information
Bogdan Drutu authored and manugarg committed Dec 31, 2019
1 parent 2410e7e commit cb1659b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions metrics/payload/payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func updateMetricValue(mv metrics.Value, val string) error {
if err := processDistValue(mVal, val); err != nil {
return fmt.Errorf("error parsing distribution value (%s): %v", val, err)
}
return nil
}

v, err := metrics.ParseValueFromString(val)
Expand Down

0 comments on commit cb1659b

Please sign in to comment.