MediaWiki
master
|
Base Metric Interface. More...
Public Member Functions | |
__construct (string $component, string $name) | |
addLabel (string $key, string $value) | |
Add a label with key => value. More... | |
addSample (Sample $sample) | |
Records a Metric Sample. More... | |
clearLabels () | |
Clears the working labels. More... | |
getComponent () | |
Returns the Metric Component. More... | |
getLabelKeys () | |
Returns array of label keys. More... | |
getLabelValues () | |
Returns an array of label values with static label values in the order of label keys. More... | |
getName () | |
Returns the Metric Name. More... | |
getSampleRate () | |
Returns the configured sample rate. More... | |
getSamples () | |
Returns subset of samples corresponding to sample rate setting. More... | |
getStatsdDataFactory () | |
Gets StatsD Data Factory instance or null. More... | |
setSampleRate (float $sampleRate) | |
Sets the sample rate. More... | |
withStaticLabels (array $labelKeys, array $labelValues) | |
Configures the metric with static labels. More... | |
withStatsdDataFactory (IBufferingStatsdDataFactory $statsdDataFactory) | |
StatsD Data Factory instance to copy metrics to. More... | |
Base Metric Interface.
Interface for defining a Base Metric.
Definition at line 35 of file BaseMetricInterface.php.
Wikimedia\Stats\Metrics\BaseMetricInterface::__construct | ( | string | $component, |
string | $name | ||
) |
string | $component | The component this metric will track. |
string | $name | The Metric Name. |
Implemented in Wikimedia\Stats\Metrics\BaseMetric.
Wikimedia\Stats\Metrics\BaseMetricInterface::addLabel | ( | string | $key, |
string | $value | ||
) |
Add a label with key => value.
string | $key | |
string | $value |
Implemented in Wikimedia\Stats\Metrics\BaseMetric.
Wikimedia\Stats\Metrics\BaseMetricInterface::addSample | ( | Sample | $sample | ) |
Records a Metric Sample.
Sample | $sample |
Implemented in Wikimedia\Stats\Metrics\BaseMetric.
Wikimedia\Stats\Metrics\BaseMetricInterface::clearLabels | ( | ) |
Wikimedia\Stats\Metrics\BaseMetricInterface::getComponent | ( | ) |
Wikimedia\Stats\Metrics\BaseMetricInterface::getLabelKeys | ( | ) |
Wikimedia\Stats\Metrics\BaseMetricInterface::getLabelValues | ( | ) |
Returns an array of label values with static label values in the order of label keys.
Implemented in Wikimedia\Stats\Metrics\BaseMetric.
Wikimedia\Stats\Metrics\BaseMetricInterface::getName | ( | ) |
Wikimedia\Stats\Metrics\BaseMetricInterface::getSampleRate | ( | ) |
Wikimedia\Stats\Metrics\BaseMetricInterface::getSamples | ( | ) |
Returns subset of samples corresponding to sample rate setting.
Implemented in Wikimedia\Stats\Metrics\BaseMetric.
Wikimedia\Stats\Metrics\BaseMetricInterface::getStatsdDataFactory | ( | ) |
Gets StatsD Data Factory instance or null.
Implemented in Wikimedia\Stats\Metrics\BaseMetric.
Wikimedia\Stats\Metrics\BaseMetricInterface::setSampleRate | ( | float | $sampleRate | ) |
Sets the sample rate.
float | $sampleRate |
Implemented in Wikimedia\Stats\Metrics\BaseMetric.
Wikimedia\Stats\Metrics\BaseMetricInterface::withStaticLabels | ( | array | $labelKeys, |
array | $labelValues | ||
) |
Configures the metric with static labels.
string[] | $labelKeys | |
string[] | $labelValues |
Implemented in Wikimedia\Stats\Metrics\BaseMetric.
Wikimedia\Stats\Metrics\BaseMetricInterface::withStatsdDataFactory | ( | IBufferingStatsdDataFactory | $statsdDataFactory | ) |
StatsD Data Factory instance to copy metrics to.
IBufferingStatsdDataFactory | $statsdDataFactory |