Skip to content

Commit

Permalink
feat: Read debug IDs from debugId field in sourcemaps (#2222)
Browse files Browse the repository at this point in the history
This is accomplished by updating `symbolic` and `rust-sourcemap`. See
getsentry/symbolic#874 and
getsentry/rust-sourcemap#97.

Closes #2220.
  • Loading branch information
loewenheim authored Nov 7, 2024
1 parent 03523ba commit 262f625
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 16 deletions.
75 changes: 61 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ sentry = { version = "0.34.0", default-features = false, features = [
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.93"
sha1_smol = { version = "1.0.0", features = ["serde"] }
sourcemap = { version = "7.0.1", features = ["ram_bundle"] }
symbolic = { version = "12.12.0", features = ["debuginfo-serde", "il2cpp"] }
sourcemap = { version = "9.0.1", features = ["ram_bundle"] }
symbolic = { version = "12.12.1", features = ["debuginfo-serde", "il2cpp"] }
thiserror = "1.0.38"
url = "2.3.1"
username = "0.2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
```
$ sentry-cli sourcemaps upload tests/integration/_fixtures/upload_debugid_alias
? success
> Found 2 files
> Analyzing 2 sources
> Rewriting sources
> Adding source map references
> Bundled 2 files for upload
> Bundle ID: [..]-[..]-[..]-[..]-[..]
> Uploaded files to Sentry
> File upload complete (processing pending on server)
> Organization: wat-org
> Project: wat-project
> Release: None
> Dist: None
> Upload type: artifact bundle

Source Map Upload Report
Scripts
~/server/chunks/1.js (sourcemap at 1.js.map, debug id 2297b93d-928d-421e-8910-127c786382da)
Source Maps
~/server/chunks/1.js.map (debug id 2297b93d-928d-421e-8910-127c786382da)

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions tests/integration/sourcemaps/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ fn command_sourcemaps_upload_some_debugids_v2() {
assert_endpoints(&upload_endpoints);
}

/// Tests that debug IDs can be found under the "debugId" field in sourcemaps.
#[test]
fn command_sourcemaps_upload_debugid_alias() {
let upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Modern, Default::default());
register_test("sourcemaps/sourcemaps-upload-debugid-alias.trycmd");
assert_endpoints(&upload_endpoints);
}

#[test]
fn command_sourcemaps_upload_no_debugids() {
let _upload_endpoints =
Expand Down

0 comments on commit 262f625

Please sign in to comment.