Open mkilling opened 4 years ago
From how I read the code of this gem, only metrics recorded more than 2 minutes ago will be reported to the backend. In my development environment, it seems I could trigger the logs indicating that my metrics were properly submitted by adding a sleep(180)
to the end of rake tasks.
I haven’t yet found a way to force reporting of all pending metrics. Is there a mechanism for that?
@mkilling Did you ever get this working? I'd really like to see something like this incorporated into Scout.
@seth-macpherson we actually ended up switching to NewRelic, which supports this out of the box and is actually cheaper than Scout for our workload.
Thanks for the update @mkilling! 👍
We do have quite a few (long-running) rake tasks in our Rails application. Runtimes vary from a few minutes up to 12 hours. For several reasons, it’s not trivial to convert these to Resque jobs. Still, we need proper instrumentation with Scout for these tasks, as right now our picture of the database queries in Scout is incomplete, and these rake tasks cause quite a bit of database load.
I looked at the Sneakers example (https://gist.github.com/itsderek23/685c7485a3bd020b6cdd9b1d61cb847f) and tried to roll my own instrumentation for rake tasks. However it seems that I’m missing something important, as the traces don’t show up on our Scout dashboard.
My code gets executed and the logs show up, but it’s almost as if the traces never get posted to Scout?