Function ( metric_name, [operation], [value] )
Description Increments, decrements, sets or clears the named gauge metric.

Refer to the User-defined Metrics article for important details.
Parameter metric_name is a string value chosen by the user to identify the gauge metric.

operation is a numeric which may take on one of four values:

  1. — Increments the gauge metric by value.
  2. — Decrements the gauge metric by value. If the current value of the gauge metric is less than value, this operation resets the gauge metric to 0.
  3. — Sets the gauge metric to value.
  4. — Clears the gauge metric to 0. The value parameter is ignored.
value is the increment/decrement amount or desired setting of the metric. If value is not specified for these operations, it defaults to 1.


  • If the operation is not specified, it defaults to

  • The following applies to all invocations of

    1. If metric_name has never been defined, the function will define it and set the metric_type to Thereafter, the function will perform the indicated operation as modified by value.
    2. If metric_name has been defined before, but has a metric_type other than, the function will log an error and the request/response causing this function call will be ended prematurely.
Returns No value returned
Examples 1. Create a gauge-type metric with name “speedo” and add 42 to it. If the gauge-type metric is not present, then create it and initialize it with default value, 0.“speedo”,, 42)

2. Increment the gauge-type metric named "speedo." by 1.“speedo”,