File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/core/src/tracing Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -55,16 +55,18 @@ export function trace<T>(
5555 }
5656
5757 if ( isThenable ( maybePromiseResult ) ) {
58- Promise . resolve ( maybePromiseResult ) . then (
59- ( ) => {
58+ maybePromiseResult . then (
59+ res => {
6060 finishAndSetSpan ( ) ;
6161 afterFinish ( ) ;
62+ return res ;
6263 } ,
6364 e => {
6465 activeSpan && activeSpan . setStatus ( 'internal_error' ) ;
6566 onError ( e , activeSpan ) ;
6667 finishAndSetSpan ( ) ;
6768 afterFinish ( ) ;
69+ throw e ;
6870 } ,
6971 ) ;
7072 } else {
@@ -87,6 +89,7 @@ export function trace<T>(
8789 * and the `span` returned from the callback will be undefined.
8890 */
8991export function startSpan < T > ( context : TransactionContext , callback : ( span : Span | undefined ) => T ) : T {
92+ console . log ( 'START SPAN 2' ) ;
9093 const ctx = normalizeContext ( context ) ;
9194
9295 return withScope ( scope => {
You can’t perform that action at this time.
0 commit comments