Hacker News new | ask | show | jobs
by aantix 933 days ago
The idea is to turn it on for a given request when needed - via a parameter, feature flag, etc.

prepend_around_action :callstacking_setup, if: -> { params[:debug] == '1' }

Once the request completes, the instrumented methods are removed to remove the performance overhead.