MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / processEvent

Function processEvent

packages/wasm/src/index.ts:44–67  ·  view source on GitHub ↗
(event: Event)

Source from the content-addressed store, hash-verified

42 patchWebAssembly();
43 },
44 processEvent(event: Event): Event {
45 let hasAtLeastOneWasmFrameWithImage = false;
46
47 const existingImagesCount = event.debug_meta?.images?.length || 0;
48
49 if (event.exception?.values) {
50 event.exception.values.forEach(exception => {
51 if (exception.stacktrace?.frames) {
52 hasAtLeastOneWasmFrameWithImage =
53 hasAtLeastOneWasmFrameWithImage ||
54 patchFrames(exception.stacktrace.frames, options.applicationKey, existingImagesCount);
55 }
56 });
57 }
58
59 if (hasAtLeastOneWasmFrameWithImage) {
60 event.debug_meta = event.debug_meta || {};
61 const mainThreadImages = getImages();
62 const workerImages = WINDOW._sentryWasmImages || [];
63 event.debug_meta.images = [...(event.debug_meta.images || []), ...mainThreadImages, ...workerImages];
64 }
65
66 return event;
67 },
68 };
69}) satisfies IntegrationFn;
70

Callers

nothing calls this directly

Calls 3

getImagesFunction · 0.90
patchFramesFunction · 0.85
forEachMethod · 0.65

Tested by

no test coverage detected