danog\BetterPrometheus\BetterGauge
Author: Daniil Gentili [email protected]
A better prometheus gauge.
$storageAdapter
: Prometheus\Storage\Adapter
Storage adapter$namespace
: string
Metric namespace$name
: string
Metric name$help
: string
Info about the metric$labels
: array<string, string>
Default labels, i.e. [‘instance’ => ‘instance_1’]addLabels(array $labels): static
set((int|double) $value, array<string, string> $labels = []): void
incBy(int|float $value, array<string, string> $labels = []): void
inc(array<string, string> $labels = []): void
dec(array<string, string> $labels = []): void
decBy(int|float $value, array<string, string> $labels = []): void
__construct(\Prometheus\Storage\Adapter $storageAdapter, string $namespace, string $name, string $help, array $labels = [])
addLabels(array $labels): static
Parameters:
$labels
: array
set((int|double) $value, array<string, string> $labels = []): void
Parameters:
$value
: (int|double)
e.g. 123$labels
: array<string, string>
e.g. [‘status’ => ‘201’, ‘opcode’ => ‘SOME_OP’]double
incBy(int|float $value, array<string, string> $labels = []): void
Parameters:
$value
: int|float
$labels
: array<string, string>
e.g. [‘status’ => ‘201’, ‘opcode’ => ‘SOME_OP’]inc(array<string, string> $labels = []): void
Parameters:
$labels
: array<string, string>
e.g. [‘status’ => ‘201’, ‘opcode’ => ‘SOME_OP’]dec(array<string, string> $labels = []): void
Parameters:
$labels
: array<string, string>
e.g. [‘status’ => ‘201’, ‘opcode’ => ‘SOME_OP’]decBy(int|float $value, array<string, string> $labels = []): void
Parameters:
$value
: int|float
$labels
: array<string, string>
e.g. [‘status’ => ‘201’, ‘opcode’ => ‘SOME_OP’]__construct(\Prometheus\Storage\Adapter $storageAdapter, string $namespace, string $name, string $help, array $labels = [])
Constructor.
Parameters:
$storageAdapter
: \Prometheus\Storage\Adapter
$namespace
: string
$name
: string
$help
: string
$labels
: array
\Prometheus\Storage\Adapter
Generated by danog/phpdoc