stevebartholomew / newrelic_moped Goto Github PK
View Code? Open in Web Editor NEWNew Relic instrumentation for Moped
License: MIT License
New Relic instrumentation for Moped
License: MIT License
I'm running trying to instrument the database queries run by my sidekiq workers. I'm getting database instrumentation for my web transactions, but not for the workers. I am getting web transactions for my application.
This is in sinatra, not rails. I haven't had a chance to try this in rails.
Is newrelic_moped set up to report non-web transactions?
Is the gem ok to use in mongoid 4?
Is this gem supporting mongoid 4?
Hi
@stevebartholomew, could you check Travis-ci settings (https://travis-ci.org/stevebartholomew/newrelic_moped) ?
It looks like this repo is not enabled for testing in Travis.
Thanks.
The page at Monitoring > Database shows all my Mongoid queries across my entire app, aggregated by type. Clicking on one of them shows a "Response time and throughput" chart, and then below that, a "Time consumption by caller" header, but no chart... Is this supposed to work? Is anyone else experiencing the same behavior?
I'm just having a quick look at the code, and am wondering about the MAPREDUCE
handling.
In this spot it is being assigned and later returned into operation_name, but then it is being ignored here?
Are there any updates expected to fix that? Thanks a lot for your work!
I'm using the newrelic_moped gem and seeing Mongo times appear in the app server breakdown for individual web transactions, but not for the main chart in the Overview tab, and not in the Database tab. Is this expected behavior? If so, do you have a sense of how much effort it would be to get data to appear in those latter locations? Perhaps I could contribute a patch if I were pointed in the right direction.
As mongoid driver changed from moped to mongo. Would there be any plan to support mongoid 5?
RPM is trying to load config during tests:
E, [2012-12-07T15:50:10.094095 #78270] ERROR -- : Unable to load configuration from /Users/stephenbartholomew/Code/open_source/newrelic_moped/config/newrelic.yml
I don't really want to add a blank config file so will figure out how to override. The following line is the root of the issue if anyone wants to try a fix:
NewRelic::Agent.manual_start
All of my Moped queries are logged like this:
QUERY database=db_name collection=col_name selector={?=>{?=>[{?=>?}]}, ?=>{?=>?}} flags=[:slave_ok] limit=-? skip=? batch_size=nil fields=nil
For some reason pretty much all interesting data is represented by question marks.
Does this gem support Mongoid 4?
gem 'newrelic_moped'
must come before
gem 'newrelic_rpm'
In your gemfile, the readme doesn't make this clear.
When using with rails newrelic_moped
after new relic_rpm
was fine, with sinatra it had to come before.
A QUERY may be continued/split using GET_MORE operations on large data sets.
These are typically heavy operations and should be measured.
Moped::Protocol::KillCursors is passed in as an op to process_with_newrelic_trace(), but collection is not defined on this, causing the gem to crash. Here is an example trace, though I've hit this from multiple places in our app:
[GEM_ROOT]/gems/newrelic_moped-0.0.2/lib/newrelic_moped/instrumentation.rb:15:in `process_with_newrelic_trace'
[GEM_ROOT]/gems/moped-1.2.0/lib/moped/node.rb:252:in `kill_cursors'
[GEM_ROOT]/gems/moped-1.2.0/lib/moped/cursor.rb:88:in `kill'
[GEM_ROOT]/gems/moped-1.2.0/lib/moped/cursor.rb:28:in `each'
[GEM_ROOT]/gems/moped-1.2.0/lib/moped/query.rb:77:in `each'
[GEM_ROOT]/gems/moped-1.2.0/lib/moped/query.rb:77:in `each'
[GEM_ROOT]/gems/mongoid-3.0.3/lib/mongoid/contextual/mongo.rb:134:in `block in each'
[GEM_ROOT]/gems/mongoid-3.0.3/lib/mongoid/contextual/mongo.rb:603:in `selecting'
[GEM_ROOT]/gems/mongoid-3.0.3/lib/mongoid/contextual/mongo.rb:133:in `each'
[PROJECT_ROOT]/app/controllers/users_controller.rb:83:in `search'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.