StatsD: Add res_statsd compatibility

Added a new api to res_statsd.c to allow it to receive a
character pointer for the value argument. This allows for a
'+' and a '-' to easily be sent with the value.

ASTERISK-25419
Reported By: Ashley Sanders

Change-Id: Id6bb53600943d27347d2bcae26c0bd5643567611
This commit is contained in:
tcambron
2015-11-18 10:07:19 -06:00
committed by Matt Jordan
parent ccf80f95a2
commit 1e0040b88f
3 changed files with 46 additions and 11 deletions
+16
View File
@@ -39,6 +39,22 @@
/*! Events over time. Sorta like increment-only counters. */
#define AST_STATSD_METER "m"
/*!
* \brief Send a stat to the configured statsd server.
*
* This function uses a character argument for value instead of
* an intmax_t argument. This is designed to be simpler to use for
* updating a current value rather than resetting it.
*
* \param metric_name String (UTF-8) name of the metric.
* \param type_str Type of metric to send.
* \param value Value to send.
* \param sample_rate Percentage of samples to send.
* \since 13
*/
AST_OPTIONAL_API(void, ast_statsd_log_string, (const char *metric_name,
const char *metric_type, const char *value, double sample_rate), {});
/*!
* \brief Send a stat to the configured statsd server.
*