scoutapp / scout_apm_ruby

ScoutAPM Ruby Agent. Supports Rails, Sinatra, Grape, Rack, and many other frameworks

Home Page:https://scoutapm.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash in ActiveRecord instrumentation

mjobin-mdsol opened this issue · comments

Possibly related or similar to #398
But yet unclear if this is caused by method aliasing and the inclusion of OpenTelemetry gems

So I am creating a different issue since the stack trace is different.

It crashes at this line

https://github.com/scoutapp/scout_apm_ruby/blob/master/lib/scout_apm/instruments/active_record.rb#L254

current_layer.desc here is a String URL

I don't have much more information yet.

Traceback (most recent call last):
       16: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/scout_apm-4.0.4/lib/scout_apm/instruments/active_record.rb:426:in `save!'
       15: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/transactions.rb:291:in `save!'
       14: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/transactions.rb:348:in `with_transaction_returning_status'
       13: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/transactions.rb:220:in `transaction'
       12: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/ar-octopus-0.10.2/lib/octopus/proxy.rb:126:in `transaction'
       11: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
       10: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/transaction.rb:183:in `within_new_transaction'
        9: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/transaction.rb:186:in `rescue in within_new_transaction'
        8: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `rollback_transaction'
        7: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/transaction.rb:145:in `rollback'
        6: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `rollback_db_transaction'
        5: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/database_statements.rb:266:in `rollback_db_transaction'
        4: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:346:in `exec_rollback_db_transaction'
        3: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/mysql2_adapter.rb:217:in `execute'
        2: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:317:in `execute'
        1: from /home/app/web/vendor/bundle/ruby/2.5.0/gems/scout_apm-4.0.4/lib/scout_apm/instruments/active_record.rb:254:in `log'
NoMethodError (undefined method `merge' for "https://servername.domain.tld/path/folder":String)

We have a debug branch out, and we'll look at the logs once we receive them to see what's going on.

I am collecting logs

Closing this as I've merged #391

That's good news, but how is Typhoeus related to ActiveRecord ?!?