You are here

public function StatsD::gauge in StatsD 7.2

Same name and namespace in other branches
  1. 6 includes/statsd.inc \StatsD::gauge()
  2. 7 includes/statsd.inc \StatsD::gauge()

Sends a gauge, an arbitrary value to statsd

Parameters

$stat : The metric to send.

$value : The value to send for this metric.

$sample_rate: A float between 0 and 1 representing the sampling rate.

File

includes/statsd.inc, line 80

Class

StatsD
Sends statistics to the stats daemon over UDP.

Code

public function gauge($stat, $value, $sample_rate = NULL) {
  $this
    ->send(array(
    $stat => "{$value}|g",
  ), $sample_rate);
}