File tree Expand file tree Collapse file tree 4 files changed +18
-10
lines changed
Expand file tree Collapse file tree 4 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 5353 "devDependencies" : {
5454 "@eslint/compat" : " ^1.4.0" ,
5555 "@eslint/js" : " ^9.37.0" ,
56- "@imagine.dev/web-components" : " ^0.0.138 " ,
56+ "@imagine.dev/web-components" : " ^0.0.139 " ,
5757 "@melt-ui/pp" : " ^0.3.2" ,
5858 "@melt-ui/svelte" : " ^0.86.6" ,
5959 "@playwright/test" : " ^1.56.0" ,
Original file line number Diff line number Diff line change @@ -19,9 +19,15 @@ export function identify(userId: string) {
1919 }
2020}
2121
22- export function getTraceId ( ) : string | undefined {
22+ export function getTraceData ( ) : {
23+ sentryTraceId ?: string ;
24+ sentryBaggage ?: string ;
25+ } {
2326 const traceData = Sentry . getTraceData ( ) ;
24- return traceData [ 'sentry-trace' ] ;
27+ return {
28+ sentryTraceId : traceData [ 'sentry-trace' ] ,
29+ sentryBaggage : traceData . baggage
30+ } ;
2531}
2632
2733export function setupSentry ( { withSessionReplay } : { withSessionReplay : boolean } ) {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { goto } from '$app/navigation';
55import { resolve } from '$app/paths' ;
66import { ensureMonacoStyles } from './monaco-style-manager' ;
77import DEV_CSS_URL from '@imagine.dev/web-components/imagine-web-components.css?url' ;
8- import { getSessionId , getTraceId } from '$lib/sentry' ;
8+ import { getSessionId , getTraceData } from '$lib/sentry' ;
99import type * as WebComponentsType from '@imagine.dev/web-components/web-components' ;
1010
1111const COMPONENT_SELECTOR = 'imagine-web-components-wrapper[data-appwrite-studio]' ;
@@ -285,6 +285,7 @@ export async function initImagine(
285285 const { initImagineConfig, initImagineRouting } = await getWebComponents ( ) ;
286286
287287 if ( ! configInitialized ) {
288+ const { sentryTraceId, sentryBaggage } = getTraceData ( ) ;
288289 initImagineConfig (
289290 {
290291 AI_SERVICE_ENDPOINT : env . PUBLIC_AI_SERVICE_BASE_URL ,
@@ -294,7 +295,8 @@ export async function initImagine(
294295 {
295296 initialTheme : get ( app ) . themeInUse ,
296297 consoleSessionId : getSessionId ( userId ) ,
297- sentryTraceId : getTraceId ( ) ,
298+ sentryTraceId,
299+ sentryBaggage,
298300 callbacks
299301 }
300302 ) ;
You can’t perform that action at this time.
0 commit comments