File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,47 +42,47 @@ snapshot[`captureException 1`] = `
4242 stacktrace: {
4343 frames: [
4444 {
45- colno: 20 ,
45+ colno: " {{colno}} " ,
4646 filename: " ext:cli/40_testing.js" ,
4747 function: " outerWrapped" ,
4848 in_app: false ,
49- lineno: 472 ,
49+ lineno: " {{lineno}} " ,
5050 },
5151 {
52- colno: 33 ,
52+ colno: " {{colno}} " ,
5353 filename: " ext:cli/40_testing.js" ,
5454 function: " exitSanitizer" ,
5555 in_app: false ,
56- lineno: 458 ,
56+ lineno: " {{lineno}} " ,
5757 },
5858 {
59- colno: 31 ,
59+ colno: " {{colno}} " ,
6060 filename: " ext:cli/40_testing.js" ,
6161 function: " resourceSanitizer" ,
6262 in_app: false ,
63- lineno: 410 ,
63+ lineno: " {{lineno}} " ,
6464 },
6565 {
66- colno: 33 ,
66+ colno: " {{colno}} " ,
6767 filename: " ext:cli/40_testing.js" ,
6868 function: " asyncOpSanitizer" ,
6969 in_app: false ,
70- lineno: 177 ,
70+ lineno: " {{lineno}} " ,
7171 },
7272 {
73- colno: 11 ,
73+ colno: " {{colno}} " ,
7474 filename: " ext:cli/40_testing.js" ,
7575 function: " innerWrapped" ,
7676 in_app: false ,
77- lineno: 526 ,
77+ lineno: " {{lineno}} " ,
7878 },
7979 {
80- colno: 27 ,
80+ colno: " {{colno}} " ,
8181 context_line: " client.captureException(something());" ,
8282 filename: " app:///test/mod.test.ts" ,
8383 function: " <anonymous>" ,
8484 in_app: true ,
85- lineno: 47 ,
85+ lineno: " {{lineno}} " ,
8686 post_context: [
8787 " " ,
8888 " await delay(200);" ,
@@ -103,12 +103,12 @@ snapshot[`captureException 1`] = `
103103 ],
104104 },
105105 {
106- colno: 12 ,
106+ colno: " {{colno}} " ,
107107 context_line: " return new Error('Some unhandled error');" ,
108108 filename: " app:///test/mod.test.ts" ,
109109 function: " something" ,
110110 in_app: true ,
111- lineno: 44 ,
111+ lineno: " {{lineno}} " ,
112112 post_context: [
113113 " }" ,
114114 " " ,
Original file line number Diff line number Diff line change @@ -156,6 +156,13 @@ function normalizeEvent(event: sentryTypes.Event): sentryTypes.Event {
156156 event . exception . values [ 0 ] . stacktrace . frames = event . exception . values [ 0 ] . stacktrace . frames . filter (
157157 frame => ! frame . filename ?. includes ( 'deno:' ) ,
158158 ) ;
159+
160+ // @ts -expect-error - we're setting a string as lineno/colno for normalization
161+ event . exception . values [ 0 ] . stacktrace . frames = event . exception . values [ 0 ] . stacktrace . frames . map ( frame => ( {
162+ ...frame ,
163+ lineno : '{{lineno}}' ,
164+ colno : '{{colno}}' ,
165+ } ) ) ;
159166 }
160167
161168 event . timestamp = 0 ;
You can’t perform that action at this time.
0 commit comments