You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing a service that uses puma and I wish to use this plugin to report statistics to our datadog service via dogstatsd.
Since dogstatsd is only available in our production network, the app cannot reach the server when running locally or in CI. This precludes me from using this plugin right now. In my opinion, it should be possible for this plugin to not crash when no statsd endpoint is available.
Luckily, you provide one! in devtools/statsd-to-stdout.rb, it's possible to run this local to the application. However, the source code of the repo is needed and I don't have it - or won't have it. Because I install this plugin as a gem. Bundler has a mechanism for this, which is the executables configuration in the gemspec. By making your statsd-to-stdout.rb an executable for which a binstub can be installed (bundle binstubs puma-plugins-statsd), the script will be available without needing the repo source code.
Here is how I imagine using that:
if [ -z"$DOGSTATSD_HOST" ];then# since this is not set, we are running locally or in some other non-prod environment so start a local statsd
nohup ./bin/statsd-to-stdout > statsd.log &echo$!> statsd-to-stdout.pid
echo"A local statsd sink has been started and is logging to statsd.log"echo"To stop the local sink, run 'kill \$(cat statsd-to-stdout.pid)'"else# for puma's statsd plugin to find the correct dogstatsd server# see: https://github.com/yob/puma-plugin-statsd#usageexport STATSD_HOST="$DOGSTATSD_HOST"export STATSD_PORT="$DOGSTATSD_PORT"fi
The text was updated successfully, but these errors were encountered:
Since dogstatsd is only available in our production network, the app cannot reach the server when running locally or in CI. This precludes me from using this plugin right now. In my opinion, it should be possible for this plugin to not crash when no statsd endpoint is available.
This is surprising to me, what makes the plugin crash?
statsd is UDP so the plugin will happily fire packets at an address that doesn't have statsd/dogstats running. Does it fail fatally when ENV['STATSD_HOST'] is unset? If so, I thought that was fixed in #20 🤔
I am developing a service that uses puma and I wish to use this plugin to report statistics to our datadog service via dogstatsd.
Since dogstatsd is only available in our production network, the app cannot reach the server when running locally or in CI. This precludes me from using this plugin right now. In my opinion, it should be possible for this plugin to not crash when no statsd endpoint is available.
Luckily, you provide one! in
devtools/statsd-to-stdout.rb
, it's possible to run this local to the application. However, the source code of the repo is needed and I don't have it - or won't have it. Because I install this plugin as a gem. Bundler has a mechanism for this, which is theexecutables
configuration in the gemspec. By making yourstatsd-to-stdout.rb
an executable for which a binstub can be installed (bundle binstubs puma-plugins-statsd), the script will be available without needing the repo source code.Here is how I imagine using that:
The text was updated successfully, but these errors were encountered: