AutoInstrumentation is enabled but not working
pawurb opened this issue · comments
Hi. I'm using ScoutAPM in a few projects. Since recently I've stopped receiving auto_instrumentation data. All the projects use scout_apm (5.3.5)
with different versions of Rails and Ruby (raging from 6.1-7.0 and 2.6.6-3.1.2).
I'm using the following config/scout_apm.yml
:
common: &defaults
auto_instruments: true
But in traces data I can see following error showing that auto instrumentation does not work:
![Screenshot 2023-10-22 at 16 26 48](https://private-user-images.githubusercontent.com/1131944/277171739-d10fa970-e269-42be-a505-615f8daf2fea.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIwMTgwMTEsIm5iZiI6MTcyMjAxNzcxMSwicGF0aCI6Ii8xMTMxOTQ0LzI3NzE3MTczOS1kMTBmYTk3MC1lMjY5LTQyYmUtYTUwNS02MTVmOGRhZjJmZWEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjZUMTgxNTExWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Mjk3ZGYxYWI3ODMzYmQ1YmJlM2NkMTU4YjY2ODI1MWQ1NmRiMTllZjdiNDA5OGNlOTkzOWQ0YWFiZTRjYmMzYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.sqFiMBi8E-TmG2k4pDqzhoouMlsFnfu91XqNx-EHfDg)
After enabling log_level: debug
I've managed to extract the following logs:
app[web.1]: [Scout] [10/22/23 14:29:02 +0000 web.1 (7)] DEBUG : AutoInstrument Significant Layer Histograms: {}
On app's startup I can see the following logs output:
[Scout] [10/22/23 14:35:06 +0000 web.1 (7)] INFO : Instrumenting ActionController (on_load)
[Scout] [10/22/23 14:35:06 +0000 web.1 (7)] INFO : Instrumenting ActionController::Base
[Scout] [10/22/23 14:35:06 +0000 web.1 (7)] INFO : Instrumenting ActionController::Metal
[Scout] [10/22/23 14:35:06 +0000 web.1 (7)] INFO : Instrumenting ActionController::Api
[Scout] [10/22/23 14:35:06 +0000 web.1 (7)] INFO : Skipping ActionController - Already Ran
[Scout] [10/22/23 14:35:06 +0000 web.1 (7)] DEBUG : Using synchronous recording
[Scout] [10/22/23 14:35:06 +0000 web.1 (7)] DEBUG : got response: #<Net::HTTPOK 200 OK readbody=true>
[Scout] [10/22/23 14:35:06 +0000 web.1 (7)] DEBUG : app_server_load OK
[Scout] [10/22/23 14:35:06 +0000 web.1 (7)] DEBUG : Finished sending Startup Info
[Scout] [10/22/23 14:35:07 +0000 web.1 (7)] INFO : Instrumenting ActiveRecord::ConnectionAdapters::AbstractAdapter
[Scout] [10/22/23 14:35:07 +0000 web.1 (7)] INFO : Instrumenting ActiveRecord::Querying - ActiveRecord::Querying
[Scout] [10/22/23 14:35:07 +0000 web.1 (7)] INFO : Instrumenting ActiveRecord::Relation#exec_queries - ActiveRecord::Relation (prepending)
So, it looks like auto_instrumentation is enabled but not gathering any data.
Any tips on how this issue can be resolved will be appreciated.
Hey @pawurb,
Do you see the following log on application start/restart?
AutoInstruments is enabled, but Parser::TreeRewriter is missing.
It may be related to:
#445
Can you reach out to us at support@scoutapm.com?
Adding parser
to Gemfile resolved the issue. Maybe you could add this info to the docs?
I did not find this error mesage in any of the logs.