From 33bcf76668dfb72e2556644d454f782e326cb5e4 Mon Sep 17 00:00:00 2001 From: Alex Bouma Date: Thu, 21 Dec 2023 15:10:40 +0100 Subject: [PATCH] Fix gauge --- src/Metrics/Types/GaugeType.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Metrics/Types/GaugeType.php b/src/Metrics/Types/GaugeType.php index 4f223ff66..e4542f702 100644 --- a/src/Metrics/Types/GaugeType.php +++ b/src/Metrics/Types/GaugeType.php @@ -22,12 +22,12 @@ final class GaugeType extends AbstractType private $last; /** - * @var int|float + * @var float */ private $min; /** - * @var int|float + * @var float */ private $max; @@ -49,8 +49,8 @@ public function __construct(string $key, $value, MetricsUnit $unit, array $tags, parent::__construct($key, $unit, $tags, $timestamp); $this->last = $value; - $this->min = $value; - $this->max = $value; + $this->min = (float) $value; + $this->max = (float) $value; $this->sum = $value; $this->count = 1; }