How to correctly upload Rust debug files to obtain source context for errors in Sentry
Suggested Solution
Add a page to document how to configure the Cargo.toml file to obtain debug files in the correct format, and explain how to use the Sentry CLI to upload debug files with sources.
Specifically, the Cargo.toml needs to contain the following:
# For source context on errors emitted from development builds
[profile.dev]
split-debuginfo = "packed"
# For source context on errors emitted from release builds
[profile.release]
split-debuginfo = "packed"
After configuring the Cargo.toml per the above, users need to build the code with cargo build (or cargo build --release, as desired).
Once compiled, the debug files and source context can be uploaded with:
Core or SDK?
Platform/SDK
Which part? Which one?
Rust SDK
Description
How to correctly upload Rust debug files to obtain source context for errors in Sentry
Suggested Solution
Add a page to document how to configure the
Cargo.toml
file to obtain debug files in the correct format, and explain how to use the Sentry CLI to upload debug files with sources.Specifically, the
Cargo.toml
needs to contain the following:After configuring the
Cargo.toml
per the above, users need to build the code withcargo build
(orcargo build --release
, as desired).Once compiled, the debug files and source context can be uploaded with: