diff --git a/lib/cjs/generated/rum.d.ts b/lib/cjs/generated/rum.d.ts index dde1ceab..b4989a51 100644 --- a/lib/cjs/generated/rum.d.ts +++ b/lib/cjs/generated/rum.d.ts @@ -293,7 +293,7 @@ export type RumErrorEvent = CommonProperties & ActionChildProperties & ViewConta /** * Source type of the error (the language or platform impacting the error stacktrace format) */ - readonly source_type?: 'android' | 'browser' | 'ios' | 'react-native' | 'flutter' | 'roku' | 'ndk' | 'ios+il2cpp' | 'ndk+il2cpp' | 'windows' | 'macos' | 'linux' | 'maui'; + readonly source_type?: 'android' | 'browser' | 'browser+wasm' | 'ios' | 'react-native' | 'flutter' | 'roku' | 'ndk' | 'ios+il2cpp' | 'ndk+il2cpp' | 'windows' | 'macos' | 'linux' | 'maui'; /** * Resource properties of the error */ @@ -383,6 +383,20 @@ export type RumErrorEvent = CommonProperties & ActionChildProperties & ViewConta readonly arch?: string; [k: string]: unknown; }[]; + /** + * WebAssembly modules available for stack trace symbolication. + */ + readonly wasm_modules?: { + /** + * URL identifying the WebAssembly module. + */ + readonly url: string; + /** + * Build ID used to identify the WebAssembly debug symbols. + */ + readonly build_id: string; + [k: string]: unknown; + }[]; /** * A boolean value saying if any of the stack traces was truncated due to minification. */ diff --git a/lib/esm/generated/rum.d.ts b/lib/esm/generated/rum.d.ts index dde1ceab..b4989a51 100644 --- a/lib/esm/generated/rum.d.ts +++ b/lib/esm/generated/rum.d.ts @@ -293,7 +293,7 @@ export type RumErrorEvent = CommonProperties & ActionChildProperties & ViewConta /** * Source type of the error (the language or platform impacting the error stacktrace format) */ - readonly source_type?: 'android' | 'browser' | 'ios' | 'react-native' | 'flutter' | 'roku' | 'ndk' | 'ios+il2cpp' | 'ndk+il2cpp' | 'windows' | 'macos' | 'linux' | 'maui'; + readonly source_type?: 'android' | 'browser' | 'browser+wasm' | 'ios' | 'react-native' | 'flutter' | 'roku' | 'ndk' | 'ios+il2cpp' | 'ndk+il2cpp' | 'windows' | 'macos' | 'linux' | 'maui'; /** * Resource properties of the error */ @@ -383,6 +383,20 @@ export type RumErrorEvent = CommonProperties & ActionChildProperties & ViewConta readonly arch?: string; [k: string]: unknown; }[]; + /** + * WebAssembly modules available for stack trace symbolication. + */ + readonly wasm_modules?: { + /** + * URL identifying the WebAssembly module. + */ + readonly url: string; + /** + * Build ID used to identify the WebAssembly debug symbols. + */ + readonly build_id: string; + [k: string]: unknown; + }[]; /** * A boolean value saying if any of the stack traces was truncated due to minification. */ diff --git a/samples/rum-events/wasm-error.json b/samples/rum-events/wasm-error.json new file mode 100644 index 00000000..499a919d --- /dev/null +++ b/samples/rum-events/wasm-error.json @@ -0,0 +1,33 @@ +{ + "type": "error", + "date": 1591284175342, + "application": { + "id": "ac8218cf-498b-4d33-bd44-151095959547" + }, + "session": { + "id": "cacbf45c-3a05-48ce-b066-d76349460599", + "type": "user" + }, + "source": "browser", + "view": { + "id": "623d50fd-75cf-4025-97d2-e51ff94171f6", + "referrer": "", + "url": "https://example.com/" + }, + "error": { + "id": "b83a5d82-cdd1-468d-9bc9-3aa9e54d957a", + "message": "unreachable", + "source": "source", + "stack": "RuntimeError: unreachable\n at wasm-function[42]:0x10", + "source_type": "browser+wasm", + "wasm_modules": [ + { + "url": "https://example.com/module.wasm", + "build_id": "abcd" + } + ] + }, + "_dd": { + "format_version": 2 + } +} diff --git a/schemas/rum/error-schema.json b/schemas/rum/error-schema.json index 34d6d9a0..7b626182 100644 --- a/schemas/rum/error-schema.json +++ b/schemas/rum/error-schema.json @@ -121,6 +121,7 @@ "enum": [ "android", "browser", + "browser+wasm", "ios", "react-native", "flutter", @@ -275,6 +276,28 @@ }, "readOnly": true }, + "wasm_modules": { + "type": "array", + "description": "WebAssembly modules available for stack trace symbolication.", + "items": { + "type": "object", + "description": "A WebAssembly module loaded by the application.", + "required": ["url", "build_id"], + "properties": { + "url": { + "type": "string", + "description": "URL identifying the WebAssembly module.", + "readOnly": true + }, + "build_id": { + "type": "string", + "description": "Build ID used to identify the WebAssembly debug symbols.", + "readOnly": true + } + } + }, + "readOnly": true + }, "was_truncated": { "type": "boolean", "description": "A boolean value saying if any of the stack traces was truncated due to minification.",