Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1000

Profiling/monitoring with Mongo::Protocol::Query#payload

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Trivial - P5
    • Resolution: Fixed
    • 2.2.0
    • 12_01_17
    • Public API
    • None
    • Fully Compatible

    Description

      Currently the #payload method:

      https://github.com/mongodb/mongo-ruby-driver/blob/3d8f27fd689e01be409b52539f716fab987a7c19/lib/mongo/protocol/query.rb#L80

      Doesn't return the collection, as the deprecated and removed #log_message did.

      Is this intended? But either way:
      Is there a better place to hook some sort of monitoring code than Mongo::Protocol::Query ?

      As an example, two projects that do that (hook on Mongo::Protocol::Query):
      github Peek and RackMiniProfiler 'https://github.com/MiniProfiler/rack-mini-profiler'.
      The later mongo 1.x, the former moped. I'm currently trying to finish the support for RackMiniProfiler:

      https://github.com/MiniProfiler/rack-mini-profiler/pull/156
      https://github.com/nofxx/rack-mini-profiler/blob/master/lib/patches/db/mongo.rb

      Thanks you!

      Attachments

        Activity

          People

            emily.stolfo Emily Stolfo
            nofxx Marcos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: