-
Type: Task
-
Resolution: Done
-
Priority: Trivial - P5
-
Affects Version/s: 2.2.0
-
Component/s: Public API
-
None
-
Fully Compatible
Currently the #payload method:
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!