Skip to content

Commit

Permalink
fix: handle +Inf (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav91 authored May 3, 2021
1 parent 3b6cf9d commit 62d2b4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/processor/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ func AutoSetMetricInfra(k string, v interface{}, metricSet *metric.Set, metrics
value := cleanValue(&v)
parsed, err := strconv.ParseFloat(value, 64)

if err != nil || strings.EqualFold(value, "infinity") || strings.EqualFold(value, "inf") || strings.EqualFold(value, "nan") {
if err != nil || strings.EqualFold(value, "infinity") || strings.EqualFold(value, "inf") || strings.EqualFold(value, "+inf") || strings.EqualFold(value, "nan") {
checkError(metricSet.SetMetric(k, value, metric.ATTRIBUTE))
} else {
foundKey := false
Expand Down

0 comments on commit 62d2b4e

Please sign in to comment.