diff --git a/CHANGELOG.md b/CHANGELOG.md index ee09fa25c74..6103fcc1560 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Features**: - Relay is now able to ingest pre-aggregated sessions, which will make it possible to efficiently handle applications that produce thousands of sessions per second. ([#815](https://github.com/getsentry/relay/pull/815)) +- Add protocol support for WASM. ([#852](https://github.com/getsentry/relay/pull/852)) - Add dynamic sampling for transactions. ([#835](https://github.com/getsentry/relay/pull/835)) **Bug Fixes**: diff --git a/relay-general/src/protocol/debugmeta.rs b/relay-general/src/protocol/debugmeta.rs index f1f1e2287da..8d7f1a66d43 100644 --- a/relay-general/src/protocol/debugmeta.rs +++ b/relay-general/src/protocol/debugmeta.rs @@ -377,13 +377,11 @@ pub struct NativeDebugImage { /// Starting memory address of the image (required). /// /// Memory address, at which the image is mounted in the virtual address space of the process. Should be a string in hex representation prefixed with `"0x"`. - #[metastructure(required = "true")] pub image_addr: Annotated, /// Size of the image in bytes (required). /// /// The size of the image in virtual memory. If missing, Sentry will assume that the image spans up to the next image, which might lead to invalid stack traces. - #[metastructure(required = "true")] pub image_size: Annotated, /// Loading address in virtual memory. @@ -436,6 +434,8 @@ pub enum DebugImage { Pe(Box), /// A reference to a proguard debug file. Proguard(Box), + /// WASM debug image. + Wasm(Box), /// A debug image that is unknown to this protocol specification. #[metastructure(fallback_variant)] Other(Object), diff --git a/relay-general/src/protocol/stacktrace.rs b/relay-general/src/protocol/stacktrace.rs index 95fbab129c3..531356002ed 100644 --- a/relay-general/src/protocol/stacktrace.rs +++ b/relay-general/src/protocol/stacktrace.rs @@ -126,6 +126,9 @@ pub struct Frame { /// then symbolication can take place. pub instruction_addr: Annotated, + /// Defines the addressing mode for addresses. + pub addr_mode: Annotated, + /// (C/C++/Native) Start address of the frame's function. /// /// We use the instruction address for symbolication, but this can be used to calculate @@ -361,6 +364,7 @@ fn test_frame_roundtrip() { }, "image_addr": "0x400", "instruction_addr": "0x404", + "addr_mode": "abs", "symbol_addr": "0x404", "trust": "69", "lang": "rust", @@ -395,6 +399,7 @@ fn test_frame_roundtrip() { }), image_addr: Annotated::new(Addr(0x400)), instruction_addr: Annotated::new(Addr(0x404)), + addr_mode: Annotated::new("abs".into()), symbol_addr: Annotated::new(Addr(0x404)), trust: Annotated::new("69".into()), lang: Annotated::new("rust".into()), diff --git a/relay-general/tests/snapshots/test_fixtures__event_schema.snap b/relay-general/tests/snapshots/test_fixtures__event_schema.snap index 3c96fb8136b..90097b671d6 100644 --- a/relay-general/tests/snapshots/test_fixtures__event_schema.snap +++ b/relay-general/tests/snapshots/test_fixtures__event_schema.snap @@ -877,6 +877,9 @@ expression: event_json_schema() { "$ref": "#/definitions/ProguardDebugImage" }, + { + "$ref": "#/definitions/NativeDebugImage" + }, { "type": "object", "additionalProperties": true @@ -1308,6 +1311,14 @@ expression: event_json_schema() } ] }, + "addr_mode": { + "description": " Defines the addressing mode for addresses.", + "default": null, + "type": [ + "string", + "null" + ] + }, "colno": { "description": " Column number within the source file, starting at 1.", "default": null, @@ -1924,9 +1935,7 @@ expression: event_json_schema() "type": "object", "required": [ "code_file", - "debug_id", - "image_addr", - "image_size" + "debug_id" ], "properties": { "arch": { @@ -1985,6 +1994,7 @@ expression: event_json_schema() }, "image_addr": { "description": " Starting memory address of the image (required).\n\n Memory address, at which the image is mounted in the virtual address space of the process. Should be a string in hex representation prefixed with `\"0x\"`.", + "default": null, "anyOf": [ { "$ref": "#/definitions/Addr" @@ -1996,6 +2006,7 @@ expression: event_json_schema() }, "image_size": { "description": " Size of the image in bytes (required).\n\n The size of the image in virtual memory. If missing, Sentry will assume that the image spans up to the next image, which might lead to invalid stack traces.", + "default": null, "type": [ "integer", "null"