File tree 2 files changed +5
-0
lines changed
dev-packages/e2e-tests/test-applications/sveltekit-2-twp/src/routes/errors
2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ import * as Sentry from '@sentry/sveltekit';
2
2
3
3
export const load = async ( { url } ) => {
4
4
if ( ! url . search ) {
5
+ console . log ( 'traceData: ' , Sentry . getTraceData ( ) ) ;
6
+ console . log ( 'spanToTrace' , Sentry . spanToTraceHeader ( Sentry . getActiveSpan ( ) ! ) ) ;
7
+ console . log ( 'activeSpan' , Sentry . getActiveSpan ( ) ) ;
5
8
Sentry . captureException ( new Error ( 'No search query provided' ) ) ;
6
9
return {
7
10
error : 'No search query provided' ,
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import { onMount } from ' svelte' ;
3
+ import * as Sentry from ' @sentry/sveltekit' ;
3
4
4
5
export let data;
5
6
6
7
onMount (() => {
7
8
8
9
if (data .error ) {
10
+ console .log (Sentry .getTraceData ());
9
11
throw new Error (' Client Error' );
10
12
}
11
13
});
You can’t perform that action at this time.
0 commit comments