Skip to content

Commit

Permalink
Fix gauge
Browse files Browse the repository at this point in the history
  • Loading branch information
stayallive authored and cleptric committed Dec 21, 2023
1 parent 28b8b63 commit 33bcf76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Metrics/Types/GaugeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}
Expand Down

0 comments on commit 33bcf76

Please sign in to comment.