@@ -205,23 +205,19 @@ var CodeOceanEditor = {
205205    newSentryTransaction : function  ( initiator ,  callback )  { 
206206        // based on Sentry recommendation. 
207207        // See https://github.com/getsentry/sentry-javascript/issues/12116 
208-         return  Sentry . continueTrace ( {  sentryTrace : '' ,  baggage : ''  } ,  ( )  =>  { 
209-             // inside of this we have a new trace! 
210-             return  Sentry . withActiveSpan ( null ,  ( )  =>  { 
211-                 // inside of this there is no parent span, no matter what! 
212-                 const  cause  =  initiator . data ( 'cause' )  ||  initiator . prop ( 'id' ) ; 
213-                 return  Sentry . startSpan ( { name : cause ,  op : "transaction" ,  forceTransaction : true } ,  async  ( )  =>  { 
214-                     // Execute the desired custom code 
215-                     try  { 
216-                         return  await  callback ( ) ; 
217-                     }  catch  ( error )  { 
218-                         // WebSocket errors are handled in `showWebsocketError` already. 
219-                         if  ( error . target  instanceof  WebSocket )  return ; 
220- 
221-                         console . error ( JSON . stringify ( error ) ) ; 
222-                         Sentry . captureException ( JSON . stringify ( error ) ,  { mechanism : { handled : false } } ) ; 
223-                     } 
224-                 } ) ; 
208+         return  Sentry . startNewTrace ( ( )  =>  { 
209+             const  cause  =  initiator . data ( 'cause' )  ||  initiator . prop ( 'id' ) ; 
210+             return  Sentry . startSpan ( { name : cause ,  op : "transaction" } ,  async  ( )  =>  { 
211+                 // Execute the desired custom code 
212+                 try  { 
213+                     return  await  callback ( ) ; 
214+                 }  catch  ( error )  { 
215+                     // WebSocket errors are handled in `showWebsocketError` already. 
216+                     if  ( error . target  instanceof  WebSocket )  return ; 
217+ 
218+                     console . error ( JSON . stringify ( error ) ) ; 
219+                     Sentry . captureException ( JSON . stringify ( error ) ,  { mechanism : { handled : false } } ) ; 
220+                 } 
225221            } ) ; 
226222        } ) ; 
227223    } , 
0 commit comments