From d4a46c577b312ab16fc6e6d88b339a0b6db39188 Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sun, 25 Aug 2019 15:04:20 -0700 Subject: - bugfix, invalid metrics parameter name --- src/Metrics.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/Metrics.php b/src/Metrics.php index cf0cbc6c..8af06ec5 100644 --- a/src/Metrics.php +++ b/src/Metrics.php @@ -38,10 +38,10 @@ final class Metrics implements MetricsInterface * * @throws MetricException */ - public function add(string $collector, float $value, array $labels = []) + public function add(string $name, float $value, array $labels = []) { try { - $this->rpc->call('metrics.Add', compact('collector', 'value', 'labels')); + $this->rpc->call('metrics.Add', compact('name', 'value', 'labels')); } catch (RPCException $e) { throw new MetricException($e->getMessage(), $e->getCode(), $e); } @@ -56,10 +56,10 @@ final class Metrics implements MetricsInterface * * @throws MetricException */ - public function sub(string $collector, float $value, array $labels = []) + public function sub(string $name, float $value, array $labels = []) { try { - $this->rpc->call('metrics.Sub', compact('collector', 'value', 'labels')); + $this->rpc->call('metrics.Sub', compact('name', 'value', 'labels')); } catch (RPCException $e) { throw new MetricException($e->getMessage(), $e->getCode(), $e); } @@ -74,10 +74,10 @@ final class Metrics implements MetricsInterface * * @throws MetricException */ - public function observe(string $collector, float $value, array $labels = []) + public function observe(string $name, float $value, array $labels = []) { try { - $this->rpc->call('metrics.Observe', compact('collector', 'value', 'labels')); + $this->rpc->call('metrics.Observe', compact('name', 'value', 'labels')); } catch (RPCException $e) { throw new MetricException($e->getMessage(), $e->getCode(), $e); } @@ -92,10 +92,10 @@ final class Metrics implements MetricsInterface * * @throws MetricException */ - public function set(string $collector, float $value, array $labels = []) + public function set(string $name, float $value, array $labels = []) { try { - $this->rpc->call('metrics.Set', compact('collector', 'value', 'labels')); + $this->rpc->call('metrics.Set', compact('name', 'value', 'labels')); } catch (RPCException $e) { throw new MetricException($e->getMessage(), $e->getCode(), $e); } -- cgit v1.2.3