@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Aptarus\PromClient\Exposition; |
| 4 | 4 | |
| 5 | -use PDO; |
|
| 6 | -use Aptarus\PromClient\Utility as U; |
|
| 7 | 5 | use Aptarus\PromClient\Configuration as Configuration; |
| 6 | +use Aptarus\PromClient\Utility as U; |
|
| 7 | +use PDO; |
|
| 8 | 8 | |
| 9 | 9 | class Emit |
| 10 | 10 | { |
@@ -9,6 +9,10 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | static $metrics_db = null; |
| 11 | 11 | |
| 12 | + /** |
|
| 13 | + * @param string $typ |
|
| 14 | + * @param string $help |
|
| 15 | + */ |
|
| 12 | 16 | public function __construct($typ, $var, $help, $labels, $label_values) |
| 13 | 17 | { |
| 14 | 18 | if (!preg_match('/^[a-zA-Z_:][a-zA-Z0-9_:]*$/', $var)) |
@@ -30,6 +34,9 @@ discard block |
||
| 30 | 34 | $sth->execute(array($this->var, $this->typ, $this->help)); |
| 31 | 35 | } |
| 32 | 36 | |
| 37 | + /** |
|
| 38 | + * @param integer $var_value |
|
| 39 | + */ |
|
| 33 | 40 | protected function _metric_inc($var_value) |
| 34 | 41 | { |
| 35 | 42 | $sth = self::$metrics_db-> |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Aptarus\PromClient; |
| 4 | 4 | |
| 5 | -use PDO; |
|
| 6 | 5 | use Aptarus\PromClient\Utility as U; |
| 7 | 6 | |
| 8 | 7 | class Metric |
@@ -4,6 +4,10 @@ |
||
| 4 | 4 | |
| 5 | 5 | class _LabelWrapper |
| 6 | 6 | { |
| 7 | + /** |
|
| 8 | + * @param string $metric_class |
|
| 9 | + * @param string $help |
|
| 10 | + */ |
|
| 7 | 11 | public function __construct($metric_class, $var, $help, $labels) |
| 8 | 12 | { |
| 9 | 13 | if (!preg_match('/^[a-zA-Z_:][a-zA-Z0-9_:]*$/', $var)) |