Skip to content

Conversation

calebhearth
Copy link

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

@calebhearth
Copy link
Author

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.

@brunofacca
Copy link
Owner

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.

This option will share the backtrace cleaner that is used to remove lines from
exception backtraces, configured in applications as `Rails.backtrace_cleaner`.
@calebhearth calebhearth force-pushed the rails-backtrace-cleaner branch from b3cee3c to 46f49f5 Compare November 14, 2024 22:26
@calebhearth
Copy link
Author

That's been changed.

@brunofacca
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants