redpanda-data / redpanda-data/benthos
metric processor: `Handler error: value … is negative`
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 571
- Forks
- 120
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 18
Description
metric:
name: indicator
type: gauge
labels:
indicator_name: ${! json("indicator") }
value: ${! json("value") }
The above processor gives me errors like: Handler error: value -0.000091 is negative. Also the doc says it must be a positive number. But it's perfectly correct for a gauge metric to have negative values. The Prometheus spec says:
valueis a float represented as required by Go's ParseFloat() function. In addition to standard numerical values, NaN, +Inf, and -Inf are valid values representing not a number, positive infinity, and negative infinity, respectively.
rpk connect --version
Version: 4.75.0
Date: 2025-12-15T20:23:55Z
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in internal/impl/pure/processor_metric.go, linked from the issue, and inspect how metric values are validated for gauge metrics. Compare that behavior with the Prometheus value format described in the issue, then verify that a negative gauge value such as -0.000091 is accepted without a handler error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100