Skip to content

metric processor: Handler error: value … is negative #339

@timka

Description

@timka
      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:

value is 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions