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
AutoInstruments - Automatically break down uninstrumented time #247
Conversation
Note that this branch currently requires disabling bootsnap. |
What was wrong with the Rails module usage? Just curious. |
@jsierles and others hit an exception with newer Rail versions: |
0b17533
to
5acdaff
Compare
I have rebased on master. |
5acdaff
to
ac9f61c
Compare
Is there already a config switch to enable/disable AutoInstruments? Otherwise, I'd like to request one. |
if ENV['AUTO_INSTRUMENT']
require 'scout_apm/auto_instrument'
end Does that work for you? |
@ioquatix Yes, that seems to work, thanks. Although I think people will expect a regular Scout config, like http://help.apm.scoutapp.com/#profile. |
Has this work been abandoned? We tried this on our production environment, and found that many traces showed even less information the previous traces, so we reverted. |
@jsierles do you mind giving me a bit more feedback? We could try rebasing on master. In theory it shouldn't be less than before, and ideally more. |
# Added AFTER `File.expand_path('../../Gemfile', __FILE__)`
# But BEFORE `require 'bundler/setup'`
require 'scout_apm/auto_instrument' How can this work, considering |
@jeremy I believe this goes into your own config |
@ioquatix Bundler setup is what sets up the load path so bundled gems can be required… so how can we require scout_apm BEFORE Bundler setup, unless you require installation as a system gem? (Pardon if I'm missing something here!) |
@itsderek23 if you want to do a rebase on master I am also happy with that. |
@ioquatix - thanks! Not ready quite yet - we're getting our ducks in a row for this. |
I would suggest hard reset to 4e8a98a and rebase on master, then squash merge. There are lots of WIP commits. Let me know if you want me to squash it down. |
I am making the requested change to the class name tracking and squashing this branch in preparation for merging. |
12c9717
to
53823de
Compare
@ioquatix - naming update is looking good. Makes it far more intuitive to go to the source in the UI. Thanks! |
That's awesome! |
@ioquatix - what do you recommend we call the code pieces we are instrumenting? It's more fine-grained than lines. For example:
|
Expressions? Method invocations? |
53823de
to
61c6a05
Compare
Verified autoinstruments now works without any changes to |
That’s awesome! |
This allows toggling of the autoinstruments install via a `auto_instrument` config option (default=true). AutoInstruments are not installed (regardless of the `auto_instrument` config value) if not using a supported Ruby version. To read the config file, I needed to move the loading of auto instruments in the Railstie after the agent is installed. I'm still seeing the same output after moving this after agent install.
Toggle install of autoinstruments via a config setting
Is there any chance of this getting merged and included in a release, keeping it disabled by default? It would allow us to use the same version of the gem in all environments and enable the feature in selected test environments. Using a different version/branch of a gem in a specific environment in a continuous delivery pipeline is a pain. |
This is our plan. We want to get some more installs of the |
@dlanderson I've added some initial checks for local assignments. I've added some tests, but I still need to see the code which caused #281 to fail. |
Sorry, hit wrong button. |
9f997fa
to
59c65bb
Compare
59c65bb
to
24691d5
Compare
@jonekdahl - We've merged this into master (version 2.6.0). To enable autoinstruments, set the |
@itsderek23 docs still suggest we should update our |
@mathieujobin Apologies - docs need updating. We have released AutoInstruments in 2.6.0. To enable, just set |
@mathieujobin - Apologies. I forgot to publish the changes. Docs are updated. /cc @dlanderson |
getting a syntax error on deploy
|
I can take a look |
this is in our code
|
AutoInstruments breaks down uninstrumented Controller time automatically, by parsing the AST tree of your own application code when it boots.
Early adopters should try out the AutoInstruments Beta in staging and development environments.
You can try out this Beta by following these steps.
If you have any questions please reach out to support@scoutapp.com!