You can clone with
HTTPS or Subversion.
Title pretty much describes it. If I call Librato.increment from the production rails console, no data gets sent. Not sure if this intended or not, but might be worth mentioning as it is a gotcha during first run testing. And it implies the data would not get sent from rake tasks either?
Is there a way to enable it in the console/rake tasks? Or maybe this is a job for the https://github.com/librato/librato-metrics gem? Thanks.
Ah yes, this is intended behavior. The reporting thread intentionally isn't started when you start up in console or test mode, I should probably make that more clear in the docs.
As for use in rake tasks and worker processes, right now using librato-metrics for more manual submission is probably the best option although we intend to provide more drop-in support for that kind of thing in librato-rails in the future.
Ok interesting. Yeah would make sense to add to the docs. And also probably to be able to set an environment variable or something to turn it on in consoles/rake tasks. Thanks!
Been thinking a little more about this. What's the use case you see for submission in a console session?
Btw, would also be cool to instrument background workers (we use Resque for this). Seeing how many of a certain job have been run, how long they are taking etc.
Yeah, it could be nice to use this gem in Resque. And it could be nice to use in the console, maybe also just to debug.
We do intend to add better resque support, monitor #8 for that - it will be a focus after we finish refactoring some of the internals. Just opened #59 for docs on manually submitting on console mode.
I believe you can currently call Librato::Rails.flush to manually submit the queued metrics, but this part of the interface is not stable and will be changing shortly so I would beware coding it into your worker processes.