danog\BetterPrometheus\BetterCollectorRegistry
Author: Daniil Gentili [email protected]
A better collector registry.
$storageAdapter
: Prometheus\Storage\Adapter
__construct(\Prometheus\Storage\Adapter $storageAdapter, bool $registerDefaultMetrics = true)
wipeStorage(): void
getMetricFamilySamples(bool $sortMetrics = true): list<\Prometheus\MetricFamilySamples>
registerGauge(string $namespace, string $name, string $help, array<string, string> $labels = []): \danog\BetterPrometheus\BetterGauge
getGauge(string $namespace, string $name): \danog\BetterPrometheus\BetterGauge
getOrRegisterGauge(string $namespace, string $name, string $help, array<string, string> $labels = []): \danog\BetterPrometheus\BetterGauge
registerCounter(string $namespace, string $name, string $help, array<string, string> $labels = []): \danog\BetterPrometheus\BetterCounter
getCounter(string $namespace, string $name): \danog\BetterPrometheus\BetterCounter
getOrRegisterCounter(string $namespace, string $name, string $help, array<string, string> $labels = []): \danog\BetterPrometheus\BetterCounter
registerHistogram(string $namespace, string $name, string $help, array<string, string> $labels = [], (non-empty-list<float>|null) $buckets = NULL): \danog\BetterPrometheus\BetterHistogram
getHistogram(string $namespace, string $name): \danog\BetterPrometheus\BetterHistogram
getOrRegisterHistogram(string $namespace, string $name, string $help, array<string, string> $labels = [], (non-empty-list<float>|null) $buckets = NULL): \danog\BetterPrometheus\BetterHistogram
registerSummary(string $namespace, string $name, string $help, array<string, string> $labels = [], int $maxAgeSeconds = 600, (non-empty-list<float>|null) $quantiles = NULL): \danog\BetterPrometheus\BetterSummary
getSummary(string $namespace, string $name): \danog\BetterPrometheus\BetterSummary
getOrRegisterSummary(string $namespace, string $name, string $help, array<string, string> $labels = [], int $maxAgeSeconds = 600, (non-empty-list<float>|null) $quantiles = NULL): \danog\BetterPrometheus\BetterSummary
__construct(\Prometheus\Storage\Adapter $storageAdapter, bool $registerDefaultMetrics = true)
CollectorRegistry constructor.
Parameters:
$storageAdapter
: \Prometheus\Storage\Adapter
$registerDefaultMetrics
: bool
\Prometheus\Storage\Adapter
wipeStorage(): void
Removes all previously stored metrics from underlying storage adapter.
getMetricFamilySamples(bool $sortMetrics = true): list<\Prometheus\MetricFamilySamples>
Parameters:
$sortMetrics
: bool
\Prometheus\MetricFamilySamples
registerGauge(string $namespace, string $name, string $help, array<string, string> $labels = []): \danog\BetterPrometheus\BetterGauge
Parameters:
$namespace
: string
e.g. cms$name
: string
e.g. duration_seconds$help
: string
e.g. The duration something took in seconds.$labels
: array<string, string>
e.g. [‘controller’ => ‘someController’, ‘action’ => ‘someAction’]getGauge(string $namespace, string $name): \danog\BetterPrometheus\BetterGauge
Parameters:
$namespace
: string
$name
: string
getOrRegisterGauge(string $namespace, string $name, string $help, array<string, string> $labels = []): \danog\BetterPrometheus\BetterGauge
Parameters:
$namespace
: string
e.g. cms$name
: string
e.g. duration_seconds$help
: string
e.g. The duration something took in seconds.$labels
: array<string, string>
e.g. [‘controller’ => ‘someController’, ‘action’ => ‘someAction’]registerCounter(string $namespace, string $name, string $help, array<string, string> $labels = []): \danog\BetterPrometheus\BetterCounter
Parameters:
$namespace
: string
e.g. cms$name
: string
e.g. requests$help
: string
e.g. The number of requests made.$labels
: array<string, string>
e.g. [‘controller’ => ‘someController’, ‘action’ => ‘someAction’]getCounter(string $namespace, string $name): \danog\BetterPrometheus\BetterCounter
Parameters:
$namespace
: string
$name
: string
getOrRegisterCounter(string $namespace, string $name, string $help, array<string, string> $labels = []): \danog\BetterPrometheus\BetterCounter
Parameters:
$namespace
: string
e.g. cms$name
: string
e.g. requests$help
: string
e.g. The number of requests made.$labels
: array<string, string>
e.g. [‘controller’ => ‘someController’, ‘action’ => ‘someAction’]registerHistogram(string $namespace, string $name, string $help, array<string, string> $labels = [], (non-empty-list<float>|null) $buckets = NULL): \danog\BetterPrometheus\BetterHistogram
Parameters:
$namespace
: string
e.g. cms$name
: string
e.g. duration_seconds$help
: string
e.g. A histogram of the duration in seconds.$labels
: array<string, string>
e.g. [‘controller’ => ‘someController’, ‘action’ => ‘someAction’]$buckets
: (non-empty-list<float>|null)
e.g. [100, 200, 300]getHistogram(string $namespace, string $name): \danog\BetterPrometheus\BetterHistogram
Parameters:
$namespace
: string
$name
: string
getOrRegisterHistogram(string $namespace, string $name, string $help, array<string, string> $labels = [], (non-empty-list<float>|null) $buckets = NULL): \danog\BetterPrometheus\BetterHistogram
Parameters:
$namespace
: string
e.g. cms$name
: string
e.g. duration_seconds$help
: string
e.g. A histogram of the duration in seconds.$labels
: array<string, string>
e.g. [‘controller’ => ‘someController’, ‘action’ => ‘someAction’]$buckets
: (non-empty-list<float>|null)
e.g. [100, 200, 300]registerSummary(string $namespace, string $name, string $help, array<string, string> $labels = [], int $maxAgeSeconds = 600, (non-empty-list<float>|null) $quantiles = NULL): \danog\BetterPrometheus\BetterSummary
Parameters:
$namespace
: string
e.g. cms$name
: string
e.g. duration_seconds$help
: string
e.g. A summary of the duration in seconds.$labels
: array<string, string>
e.g. [‘controller’ => ‘someController’, ‘action’ => ‘someAction’]$maxAgeSeconds
: int
e.g. 604800$quantiles
: (non-empty-list<float>|null)
e.g. [0.01, 0.5, 0.99]getSummary(string $namespace, string $name): \danog\BetterPrometheus\BetterSummary
Parameters:
$namespace
: string
$name
: string
getOrRegisterSummary(string $namespace, string $name, string $help, array<string, string> $labels = [], int $maxAgeSeconds = 600, (non-empty-list<float>|null) $quantiles = NULL): \danog\BetterPrometheus\BetterSummary
Parameters:
$namespace
: string
e.g. cms$name
: string
e.g. duration_seconds$help
: string
e.g. A summary of the duration in seconds.$labels
: array<string, string>
e.g. [‘controller’ => ‘someController’, ‘action’ => ‘someAction’]$maxAgeSeconds
: int
e.g. 604800$quantiles
: (non-empty-list<float>|null)
e.g. [0.01, 0.5, 0.99]Generated by danog/phpdoc