res_statsd: handle non-standard meter type safely

Meter types are not well supported,
lacking support in telegraf, datadog and the official statsd servers.
We deprecate meters and provide a compliant fallback for any existing usages.

A flag has been introduced to allow meters to fallback to counters.


ASTERISK-29513

Change-Id: I5fcb385983a1b88f03696ff30a26b55c546a1dd7
This commit is contained in:
Rijnhard Hessel
2021-07-08 14:34:27 +02:00
committed by George Joseph
parent 0460e77e51
commit b40e97b1d7
4 changed files with 28 additions and 2 deletions

View File

@@ -41,9 +41,13 @@
#define AST_STATSD_TIMER "ms"
/*! Distribution of values over time. */
#define AST_STATSD_HISTOGRAM "h"
/*! Events over time. Sorta like increment-only counters. */
/*!
* Meters are non-standard and poorly supported by StatsD servers
* \deprecated You should switch to counter or stateful counters for a similar effect.
*/
#define AST_STATSD_METER "m"
/*!
* \brief Send a stat to the configured statsd server.
*