callstacking-rails icon indicating copy to clipboard operation
callstacking-rails copied to clipboard

System Stack Level too deep

Open writercoder opened this issue 1 year ago • 2 comments

Good afternoon,

I tried kicking the tyres on call stacking but got a "System Stack Level too deep" when I tried to record a trace.

callstacking-stack

I'll try again without NewRelic and AppSignal gems to see if they are causing the issue.

BTW using rails 7.0.8 on ruby 3.1.4

writercoder avatar Nov 23 '23 15:11 writercoder

I'll try again without NewRelic and AppSignal gems to see if they are causing the issue.

Still seeing the issue without these gems installed.

writercoder avatar Nov 23 '23 16:11 writercoder

My guess is that there is an application level Rails.root override in lib/rails.rb:64

Since Call Stacking instruments application level calls and utilizes ::Rails.root within its instrumentation method, it becomes a circular reference. https://github.com/callstacking/callstacking-rails/blob/65313fe53c933a5d208df4ae0c01a8ef304aca70/lib/callstacking/rails/instrument.rb#L70C34-L70C34

This will take some refactoring on my end to resolve.

aantix avatar Dec 03 '23 07:12 aantix