Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RocketPants::Instrumentation not displaying Controller Runtimes #107

Open
ahegyi opened this issue Jul 11, 2014 · 1 comment
Open

RocketPants::Instrumentation not displaying Controller Runtimes #107

ahegyi opened this issue Jul 11, 2014 · 1 comment

Comments

@ahegyi
Copy link
Contributor

ahegyi commented Jul 11, 2014

Apologies in advance if I'm doing this wrong... I'm a bit unfamiliar with the way that instrumentation works in Rails.

With a basic setup, it appears that Rocket Pants is not properly injecting controller runtimes, because (I believe) that Rocket Pants has its own separate instrumentation class, RocketPants::Instrumentation.

For example, the following request to a Rocket Pants endpoint returns one time without a breakdown:

Started GET "/api/1/users/self" for 127.0.0.1 at 2014-07-10 16:41:38 -0700
Completed 200 OK in 42.4ms

However, a typical ActionController descendant would leave a log entry like this:

Started GET "/marks/1000" for 127.0.0.1 at 2014-07-10 16:41:19 -0700
Completed 200 OK in 231.0ms (Views: 36.9ms | ActiveRecord: 57.4ms | Solr: 0.0ms)

How can we automatically have RocketPants tie into any injections from ActionController instrumentation add-ons, such as ActiveRecord and Solr?

I've been fudging around with this, but I can't seem to figure out the root issue.

Strangely enough, I was able to workaround for ActiveRecord by adding include ActiveRecord::Railties::ControllerRuntime into my base API controller (descending from RocketPants::Base), but not for Solr, when I tried adding include Sunspot::Rails::Railties::ControllerRuntime.

(Could this be because of some disparities between ActionController::Instrumentation and RocketPants::Instrumentation?)

@Sutto
Copy link
Owner

Sutto commented Oct 7, 2014

I believe it's because we're not directly including all of the runtime mixins, so controllers that manually mix this in to ActionController::Base don't include it in RocketPants::Base unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants