diff options
author | Wolfy-J <[email protected]> | 2019-08-25 15:04:20 -0700 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-08-25 15:04:20 -0700 |
commit | d4a46c577b312ab16fc6e6d88b339a0b6db39188 (patch) | |
tree | c53c891e942ad22298491543685e6547ca606683 | |
parent | eef69c2d4018f7224b9744b76afd550f4e72c85f (diff) |
- bugfix, invalid metrics parameter name
-rw-r--r-- | src/Metrics.php | 16 |
1 files changed, 8 insertions, 8 deletions
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); } |