Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please check configuration and setup for Rails 2 #6

Closed
UNISERVO1 opened this issue Jan 8, 2015 · 1 comment
Closed

Please check configuration and setup for Rails 2 #6

UNISERVO1 opened this issue Jan 8, 2015 · 1 comment

Comments

@UNISERVO1
Copy link

Used the following setup in my environment.rb per instructions:

Rails::Initializer.run do |config|
  ...
  require 'trashed/reporter'
  require 'statsd'

  statsd_reporter = Trashed::Reporter.new
  statsd_reporter.logger = Rails.logger
  statsd_reporter.statsd = Statsd.new('127.0.0.1')

  config.middleware.use Trashed::Rack, statsd_reporter
end

I can see the rack middleware is loaded using bundle exec rake middleware:

use Trashed::Rack, #<Trashed::Reporter:0x1102cc660 @timing_dimensions=#<Proc:0x0000000110511268@/Users/marcusyoung/Develop/registria/vendor/cache/trashed-3133b6603148/lib/trashed/reporter.rb:16>, @gauge_sample_rate=0.05, @timing_sample_rate=0.1, @gauge_dimensions=#<Proc:0x00000001105110b0@/Users/marcusyoung/Develop/registria/vendor/cache/trashed-3133b6603148/lib/trashed/reporter.rb:17>, @statsd=#<Statsd:0x1102baf00 @batch_size=10, @prefix=nil, @postfix=nil, @port=8125, @host="127.0.0.1">, @logger=nil>

But I'm not getting any stats generated and verified statsd_reporter.statsd above can send information to my local Statsd setup using Pry. Is there something missing in my environment?

@UNISERVO1
Copy link
Author

Just realized this is due to me using Ruby 1.8.7 instead of REE. Will use REE!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant