mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-28 00:10:25 -07:00
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:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user