Return to index

metrics functions

bool = metric_add(name,n)

top

Add n to a counter metric. Returns false if not found, wrong type, or metrics not enabled.


bool = metric_deregister(name)

top

Deregister and remove a custom metric. Returns false if not found or metrics not enabled.


bool = metric_enabled()

top

Returns true if the metrics server is enabled (started with -M or ZA_PROMETHEUS env var).


bool = metric_inc(name)

top

Increment a counter metric by 1. Returns false if not found, wrong type, or metrics not enabled.


bool = metric_observe(name,value)

top

Record an observation in a summary metric. Returns false if not found, wrong type, or metrics not enabled.


bool = metric_register(name,type)

top

Register a custom metric with type 'counter', 'gauge', or 'summary'. Returns false if already registered or metrics not enabled.


bool = metric_set(name,value)

top

Set a gauge metric to a value. Returns false if not found, wrong type, or metrics not enabled.