Skip to content

feat: lazily resolve Backtrace symbols#2283

Merged
pjenvey merged 2 commits intomasterfrom
feat/unresolved-backtrace-STOR-560
May 7, 2026
Merged

feat: lazily resolve Backtrace symbols#2283
pjenvey merged 2 commits intomasterfrom
feat/unresolved-backtrace-STOR-560

Conversation

@pjenvey
Copy link
Copy Markdown
Member

@pjenvey pjenvey commented May 6, 2026

Description

This lazily resolves backtraces symbols.

A local cargo nextest run on current master:
Summary [ 77.386s] 96 tests run: 96 passed, 0 skipped
On this branch:
Summary [ 8.840s] 96 tests run: 96 passed, 0 skipped

Though 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

@pjenvey pjenvey requested review from chenba and taddes May 6, 2026 23:34
/// Return a resolved `Backtrace` from `ReportableError`.
///
/// `Backtrace::resolve` requires mutability so this clones the original `Backtrace`.
fn resolved_backtrace(err: &dyn ReportableError) -> Option<Backtrace> {
Copy link
Copy Markdown
Member Author

@pjenvey pjenvey May 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?)

Copy link
Copy Markdown
Collaborator

@chenba chenba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown
Collaborator

@taddes taddes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍

@pjenvey pjenvey merged commit c00fcb3 into master May 7, 2026
26 checks passed
@pjenvey pjenvey deleted the feat/unresolved-backtrace-STOR-560 branch May 7, 2026 18:36
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.

3 participants