File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -527,6 +527,7 @@ declare global {
527527 setLogPings : ( flag : boolean ) => void ;
528528 setDebugViewTag : ( value : string ) => void ;
529529 setSourceTags : ( value : string [ ] ) => void ;
530+ debugSession : ( ) => void ;
530531 } ;
531532 }
532533}
@@ -558,6 +559,21 @@ if (
558559 "Pings will be given the specified tags until the tab is closed."
559560 ) ;
560561 } ,
562+ debugSession : ( ) => {
563+ const sessionId = Context . metricsDatabase . getMetric (
564+ CLIENT_INFO_STORAGE ,
565+ Context . coreMetrics . sessionId
566+ ) ;
567+
568+ if ( ! ! sessionId && ! ! Context . config . debugViewTag ) {
569+ window . open (
570+ `https://debug-ping-preview.firebaseapp.com/stream/${ Context . config . debugViewTag } #${ sessionId } ` ,
571+ "_blank"
572+ ) ;
573+ } else {
574+ console . info ( "You must set a debug tag via `window.Glean.setDebugViewTag` before debugging your session." ) ;
575+ }
576+ }
561577 } ;
562578}
563579
You can’t perform that action at this time.
0 commit comments