diff options
author | tcambron <tcambron@digium.com> | 2015-11-03 14:36:43 -0600 |
---|---|---|
committer | tcambron <tcambron@digium.com> | 2015-11-04 14:59:12 -0600 |
commit | 379c041038b14b2adb53ad9b16c1268b389357e2 (patch) | |
tree | 01dd0b353b13026ad4bba2b270d30e76a1100f55 /include/asterisk/statsd.h | |
parent | 40574a2ea31f03d5a4d3914f1e20895a9b49d7f0 (diff) |
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
Diffstat (limited to 'include/asterisk/statsd.h')
-rw-r--r-- | include/asterisk/statsd.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asterisk/statsd.h b/include/asterisk/statsd.h index 8e5e2f987..a04407f89 100644 --- a/include/asterisk/statsd.h +++ b/include/asterisk/statsd.h @@ -42,6 +42,22 @@ /*! * \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. + * * The is the most flexible function for sending a message to the statsd server, * but also the least easy to use. See ast_statsd_log() or * ast_statsd_log_sample() for a slightly more convenient interface. |