rpm_contrib not showing mongodb

karl.baum's Avatar

karl.baum

13 May, 2010 11:24 AM via web

I upgraded to rpm_contrib and the newest newrelic gem, but i don't see any additional mongodb information.

newrelic_rpm (2.11.3)
rpm_contrib (1.0.9)

Is there anything else i need to do?

thx

-karl

  1. Support Staff 2 Posted by Brent Miller on 13 May, 2010 04:40 PM

    Brent Miller's Avatar

    Hi Karl,

    Have you bounced your app? The agent will need to re-boot to take advantage of the new gem.

    Brent

  2. 3 Posted by karl.baum on 13 May, 2010 05:01 PM

    karl.baum's Avatar

    Yes our capistrano deploy process restarts everything on deploy.

    Thanks!

  3. Support Staff 4 Posted by Bill Kayser on 13 May, 2010 05:02 PM

    Bill Kayser's Avatar

    The only thing that would prevent it loading is if ::MongoMapper is not defined at the time the RPM agent is initialized. That could be a gem load order issue.

    If you set the log level to debug in newrelic.yml you should see a description of all the instrumentation being registered, as well as an indication that the agent is starting up and reporting data.

    Look for the log messages at debug level about MongoMapper. If you don't see anything, try loading the mongodb gem sooner, perhaps manually, just to see if it is indeed an ordering problem.

    Let me know what you learn.

  4. 5 Posted by karl.baum on 13 May, 2010 05:07 PM

    karl.baum's Avatar

    We use mongoid as our orm.

    Judging by the rpm_contrib page, it seemed like mongodb was independent of the object mapping tool.

    thx.

    -karl

  5. Support Staff 6 Posted by Bill Kayser on 14 May, 2010 06:09 AM

    Bill Kayser's Avatar

    Karl I don't know much about the mongodb instrumentation or about mongodb. Are you saying our "mongodb" instrumentation only works if you're using mongomapper--presumably a separate gem?

    I'll need to update the readme.

    Any interest in contributing mongomapper support?

  6. 7 Posted by karl.baum on 14 May, 2010 05:03 PM

    karl.baum's Avatar

    Hmmmm.. i was only pointing that out because you had mentioned:

    "The only thing that would prevent it loading is if ::MongoMapper is not defined at the time the RPM agent is initialized. "

    I really don't know the internals of rpm_contrib either, i was just judging by what the documentation on github said.

    thx

  7. Support Staff 8 Posted by Bill Kayser on 14 May, 2010 09:51 PM

    Bill Kayser's Avatar

    Yeah I'll update the readme.

  8. Bill Kayser resolved this discussion on 14 May, 2010 09:51 PM.

  9. karl.baum re-opened this discussion on 14 May, 2010 10:12 PM

  10. 9 Posted by karl.baum on 14 May, 2010 10:12 PM

    karl.baum's Avatar

    Ok, so then i do have to be using mongomapper. Why not just put the instrumentation on the ruby driver?

    Or maybe we could add support for mongoid?

  11. Support Staff 10 Posted by Bill Kayser on 14 May, 2010 10:29 PM

    Bill Kayser's Avatar

    Yes adding support for mongoid would be ideal. I may even reach out to the offer if I can somehow motivate him to write some instrumentation. It was by the grace of some kind soul that we even got the mongomapper instrumentation.

    If you want to write the mongoid instrumentation you can fork rpm_contrib and add it to the mongodb.rb file.

  12. Bill Kayser resolved this discussion on 14 May, 2010 10:29 PM.

  13. karl.baum re-opened this discussion on 15 May, 2010 01:44 AM

  14. 11 Posted by karl.baum on 15 May, 2010 01:44 AM

    karl.baum's Avatar

    Ok, i've forked mongoid and I added and mongoid.rb.

    http://github.com/kbaum/rpm_contrib/blob/master/lib/rpm_contrib/ins...

    I started to add a test (the hardest part) but I had some questions for you.

    http://github.com/kbaum/rpm_contrib/blob/master/test/mongoid_test.rb

    It looks like i have to manually include the instrumentation file. I think this may be a bug that i noticed in rpm_contrib but i'm not sure. I did have to manually initialize the plugin when i used it.

    Also, do you have any recommendations for testing that method tracers were correctly added to a class?

    thx.

    -karl

  15. Support Staff 12 Posted by Bill Kayser on 24 May, 2010 06:18 PM

    Bill Kayser's Avatar

    Thanks for the contribution. I've added it to the gem and released it.

    What I do to test the instrumentation is invoke the instrumented method and then examine the metrics stored in the agent. For an example of this have a look at the task_instrumentation_test.rb file in the rpm agent.

  16. Bill Kayser resolved this discussion on 24 May, 2010 06:18 PM.

Comments are currently closed for this discussion. You can start a new one.