Pandabot/vendor/danog/better-prometheus/docs/danog/BetterPrometheus/BetterCollectorRegistry.md

9.8 KiB
Executable file

title description
danog\BetterPrometheus\BetterCollectorRegistry: A better collector registry.

danog\BetterPrometheus\BetterCollectorRegistry

Back to index

Author: Daniil Gentili daniil@daniil.it

A better collector registry.

Properties

  • $storageAdapter: Prometheus\Storage\Adapter

Method list:

Methods:

__construct(\Prometheus\Storage\Adapter $storageAdapter, bool $registerDefaultMetrics = true)

CollectorRegistry constructor.

Parameters:

  • $storageAdapter: \Prometheus\Storage\Adapter
  • $registerDefaultMetrics: bool

See also:

  • \Prometheus\Storage\Adapter

wipeStorage(): void

Removes all previously stored metrics from underlying storage adapter.

getMetricFamilySamples(bool $sortMetrics = true): list<\Prometheus\MetricFamilySamples>

Parameters:

  • $sortMetrics: bool

See also:

  • \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']

See also:

getGauge(string $namespace, string $name): \danog\BetterPrometheus\BetterGauge

Parameters:

  • $namespace: string
  • $name: string

See also:

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']

See also:

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']

See also:

getCounter(string $namespace, string $name): \danog\BetterPrometheus\BetterCounter

Parameters:

  • $namespace: string
  • $name: string

See also:

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']

See also:

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]

See also:

getHistogram(string $namespace, string $name): \danog\BetterPrometheus\BetterHistogram

Parameters:

  • $namespace: string
  • $name: string

See also:

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]

See also:

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]

See also:

getSummary(string $namespace, string $name): \danog\BetterPrometheus\BetterSummary

Parameters:

  • $namespace: string
  • $name: string

See also:

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]

See also:


Generated by danog/phpdoc