Closed jeremycw closed 2 years ago
Hey @jeremycw,
Since this seems to be a Rails related pull request, would it be possible to make the configuration option take a lambda instead of a string so users could pass closures to ActiveSupport::BacktraceCleaner
? I would also ask that we add tests for this behavior. For core functionality we would like to keep our 100% branch coverage.
Thanks, Hunter
@hmadison Good suggestion. I confirmed that it also works doing ->(trace) { Rails.backtrace_cleaner.clean(trace) }
@hmadison right now we are running off of a fork of this gem as this functionality we find helpful so hopefully we can get it merged in
Hey @daande,
If you can reach out to your TAM and have them find me internally I can get the CLA stuff handled through them and get this merged Monday.
Thanks, Hunter
@hmadison we created a support request in instana (https://support.instana.com/hc/en-us/requests/25636) hopefully that is sufficient
@hmadison any update on this? See attached ticket above.
I've merged the change and will work on getting a new release pushed tomorrow morning.
@hmadison can you cut a release with this change please?
What
Adds a config option called
backtrace_path_filter
that allows the lines in backtraces to be compared against the filter to see if they should be included in the backtraceWhy
Backtraces are limited to a number of lines (default 30) and are often coming from so deep in library/framework code that you may not even see the originating user code in the backtrace. However, library code is often located in a different path than user code. This can be leveraged to filter the call stack to relevant code.