Subject: Adding metrics in realtime

Original Post Cameron Westland's Avatar

Cameron Westland

10 Sep, 2009 07:18 PM

Hey there,

We have an application where we have multiple plans, we possibly will add new plan configurations in the future (we have esoteric enterprise plans that will be created all the time.) I'd like to run the number of accounts in a given plan through dash:

Fiveruns::Dash::Rails.start(:staging => 'd328a47f5b5c3b7ab111e19dd2d5660d984f14d1') do |config|

config.add_recipe :application, :url => "http://myapplication.com/recipe/url" do |recipe|

Package.all.each do |package|
  recipe.absolute "#{package.name.gsub!(/\W/, '_').downcase}_accounts" do
    package.accounts.count
  end
end

end end

I was surprised that this works, however if we add a new plan while the application server is booted it does not start reporting until the server restarts. Is there a better way of creating dynamic metrics?

Reply to this discussion

Preview Comments are parsed with Markdown. Help with syntax

Attached Files

You can attach files up to 10MB

Five times two is what?