File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
packages/sveltekit/src/client Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -179,14 +179,13 @@ function instrumentSvelteKitFetch(originalFetch: SvelteKitFetch): SvelteKitFetch
179179 name : `${ requestData . method } ${ requestData . url } ` , // this will become the description of the span
180180 op : 'http.client' ,
181181 data : requestData ,
182- parentSpanId : activeSpan && activeSpan . spanId ,
183182 } ,
184- async span => {
185- const fetchResult : Response = await wrappingTarget . apply ( thisArg , [ input , patchedInit ] ) ;
183+ span => {
184+ const promise : Promise < Response > = wrappingTarget . apply ( thisArg , [ input , patchedInit ] ) ;
186185 if ( span ) {
187- span . setHttpStatus ( fetchResult . status ) ;
186+ promise . then ( res => span . setHttpStatus ( res . status ) ) . catch ( _ => span . setStatus ( 'internal_error' ) ) ;
188187 }
189- return fetchResult ;
188+ return promise ;
190189 } ,
191190 ) ;
192191 } else {
You can’t perform that action at this time.
0 commit comments