danog\BetterPrometheus\BetterCounter
Author: Daniil Gentili [email protected]
A better prometheus counter.
$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
inc(array<string, string> $labels = []): void
incBy((int|float) $count, 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
inc(array<string, string> $labels = []): void
Parameters:
$labels
: array<string, string>
e.g. [‘status’ => ‘201’, ‘opcode’ => ‘SOME_OP’]incBy((int|float) $count, array<string, string> $labels = []): void
Parameters:
$count
: (int|float)
e.g. 2$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