Add symbol based backtrace filtering#131
Open
MilesConn wants to merge 2 commits intorootcause-rs:mainfrom
Open
Add symbol based backtrace filtering#131MilesConn wants to merge 2 commits intorootcause-rs:mainfrom
MilesConn wants to merge 2 commits intorootcause-rs:mainfrom
Conversation
… This allows crate filtering to work for vendored crates or for build systems that are not cargo. Additionally, this adds a `skipped_path_patterns` options to `BackTraceFilter` that allows filtering of non rust dependencies like glibc, or test harnesses like gsuite. Note, this last change requires a semver bump.
…ur is more in line with the flavor text.
Contributor
|
Can you be a bit more specific about what didn't work for you, what you tried (and failed) to do and how this fixes it? As far as I remember from the last time I looked at this code, it's hard to get consistent results using only the symbol names, specially when using |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was really excited to use
rootcausebut I was working on a project where crates were vendored with a build system that wasn't cargo and I had other non rust code in my backtraces. It seemed that I couldn't get backtrace filtering to work for either of those things.I changed the backtrace filtering logic to now filter based on demangled symbol name instead of paths. This allows filtering to work with vendored crates or other scenarios where the crates aren't located in
.registry.As a fallback, I also added a new
skipped_path_patternsfield that allows filtering based on path as well.Testing
In a demo project I had given this full backtrace
with this filter
I now get
I also made another small change that
RUST_BACKTRACE=fullnow ignores all filtering. Anyways, open to feedback and thanks for the project!