MediaWiki REL1_39
Wikimedia\Metrics\GaugeMetric Class Reference

Public Member Functions

 __construct (array $config, MetricUtils $metricUtils)
 
 render ()
 
 set (float $value, array $labels=[])
 
 validateLabels (array $labels=[])
 Validate provided labels.
 

Detailed Description

Definition at line 31 of file GaugeMetric.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Metrics\GaugeMetric::__construct ( array $config,
MetricUtils $metricUtils )
Parameters
array$configassociative array:
  • name: (string) The metric name
  • extension: (string) The extension generating the metric
  • labels: (array) List of metric dimensional instantiations for filters and aggregations
  • sampleRate: (float) Optional sampling rate to apply
MetricUtils$metricUtils

Definition at line 53 of file GaugeMetric.php.

References Wikimedia\Metrics\MetricUtils\setTypeIndicator(), and Wikimedia\Metrics\MetricUtils\validateConfig().

Member Function Documentation

◆ render()

Wikimedia\Metrics\GaugeMetric::render ( )
Returns
string[]

Definition at line 83 of file GaugeMetric.php.

◆ set()

Wikimedia\Metrics\GaugeMetric::set ( float $value,
array $labels = [] )
Parameters
float$value
string[]$labels

Definition at line 72 of file GaugeMetric.php.

◆ validateLabels()

Wikimedia\Metrics\GaugeMetric::validateLabels ( array $labels = [])

Validate provided labels.

Parameters
string[]$labels

Definition at line 64 of file GaugeMetric.php.


The documentation for this class was generated from the following file: