Looks like the Prometheus\Gauge::decBy method is forcing the caller to send an int value. Here's the method signature:
/**
* @param int $value
* @param string[] $labels
*/
public function decBy(int $value, array $labels = []): void
{
$this->incBy(-$value, $labels);
}
I think this a mistake, because set() and incBy() accept float values:
/**
* @param double $value e.g. 123
* @param string[] $labels e.g. ['status', 'opcode']
*/
public function set(float $value, array $labels = []): void {}
/**
* @param int|float $value
* @param string[] $labels
*/
public function incBy($value, array $labels = []): void {}
Am I missing something?
I can create a PR if you want to fix the issue, but I wasn't sure if there was any kind of issues preventing the usage of a flat specifically here.
Hi,
Looks like the
Prometheus\Gauge::decBy
method is forcing the caller to send anint
value. Here's the method signature:I think this a mistake, because
set()
andincBy()
acceptfloat
values:Am I missing something? I can create a PR if you want to fix the issue, but I wasn't sure if there was any kind of issues preventing the usage of a flat specifically here.
Thx