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>(
55
55
}
56
56
57
57
if ( isThenable ( maybePromiseResult ) ) {
58
- Promise . resolve ( maybePromiseResult ) . then (
59
- ( ) => {
58
+ maybePromiseResult . then (
59
+ res => {
60
60
finishAndSetSpan ( ) ;
61
61
afterFinish ( ) ;
62
+ return res ;
62
63
} ,
63
64
e => {
64
65
activeSpan && activeSpan . setStatus ( 'internal_error' ) ;
65
66
onError ( e , activeSpan ) ;
66
67
finishAndSetSpan ( ) ;
67
68
afterFinish ( ) ;
69
+ throw e ;
68
70
} ,
69
71
) ;
70
72
} else {
@@ -87,6 +89,7 @@ export function trace<T>(
87
89
* and the `span` returned from the callback will be undefined.
88
90
*/
89
91
export function startSpan < T > ( context : TransactionContext , callback : ( span : Span | undefined ) => T ) : T {
92
+ console . log ( 'START SPAN 2' ) ;
90
93
const ctx = normalizeContext ( context ) ;
91
94
92
95
return withScope ( scope => {
You can’t perform that action at this time.
0 commit comments