active-record-query-trace icon indicating copy to clipboard operation
active-record-query-trace copied to clipboard

Add :rails_backtrace_cleaner level option

Open calebhearth opened this issue 1 year ago • 4 comments

This option will share the backtrace cleaner that is used to remove lines from exception backtraces, configured in applications as Rails.backtrace_cleaner.

calebhearth avatar Nov 11 '24 21:11 calebhearth

I just saw that this had previously been removed. I'm avoiding clearing things in the backtrace filter when setting to the shared one but another option would be to duplicate it when set this way, which may also avoid the pitfalls of the previous version.

calebhearth avatar Nov 12 '24 00:11 calebhearth

Hi Caleb,. Thank you for your contribution. I think duplicating it makes sense. It won't prevent conflicts with other gems that may be loaded and make changes to the backtrace cleaner before our gem is loaded, but people can always use one of the other levels if that happens.

brunofacca avatar Nov 13 '24 11:11 brunofacca

That's been changed.

calebhearth avatar Nov 14 '24 22:11 calebhearth

setup_backtrace_cleaner has to return the cleaner object. Also, can you please add a test case for the new cleaner here? The CI is broken and I currently don't have the bandwidth to fix it, but please run the specs locally.

brunofacca avatar Nov 15 '24 14:11 brunofacca