feat: lazily resolve Backtrace symbols#2283
Merged
Conversation
pjenvey
commented
May 7, 2026
| /// Return a resolved `Backtrace` from `ReportableError`. | ||
| /// | ||
| /// `Backtrace::resolve` requires mutability so this clones the original `Backtrace`. | ||
| fn resolved_backtrace(err: &dyn ReportableError) -> Option<Backtrace> { |
Member
Author
There was a problem hiding this comment.
We can't get a &mut dyn ReportableError in this module because we get them via actix_web::Error:as_error (maybe actix-web could support this actix/actix-web#4061?)
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.
Description
This lazily resolves backtraces symbols.
A local cargo nextest run on current master:
Summary [ 77.386s] 96 tests run: 96 passed, 0 skippedOn this branch:
Summary [ 8.840s] 96 tests run: 96 passed, 0 skippedThough I'm not sure this helps very much on a busy server, as only the first time resolving a unique frame seems to be the slowest (at least in tests) and this change incurs an extra clone of Backtrace when we emit Sentry events.
Issue(s)
Closes STOR-560