-
Notifications
You must be signed in to change notification settings - Fork 140
Description
Hey all,
Firstly, thanks for making such a wonderful piece of software. Appreciate it :)
I'm wondering about the error behavior of send_stats in lib/datadog/statsd.rb, which is called by count, distribution, gauge, histogram, set, and timing.
Specifically, I was wondering whether calling this function can result in an error being raised.
I looked at the implementation of send_stats and noticed that it calls some functions that could raise. For example, send_stats calls forwarder.send_message(full_stat), which calls sender.add(message). The implementation of sender.add seems like it could raise the following error.
def add(message)
raise ArgumentError, 'Start sender first' unless message_queue
... continued ...
end
This issue from 2016 seems to indicate that send_stats is safe (i.e. does not raise an error or call any functions that raise errors), but I wanted to re-confirm the answer.
Thanks!