File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -122,19 +122,15 @@ export class DebugSymbolicator implements Integration {
122122 * @inheritDoc
123123 */
124124 public setupOnce ( ) : void {
125- console . log ( 'setupOnce' ) ;
126125 addGlobalEventProcessor ( async ( event : Event , hint ?: EventHint ) => {
127126 const self = getCurrentHub ( ) . getIntegration ( DebugSymbolicator ) ;
128- console . log ( 'addGlobalEventProcessor' , hint . originalException ) ;
129127 if ( ! self || hint === undefined || hint . originalException === undefined ) {
130128 return event ;
131129 }
132130 // @ts -ignore
133131 const error : NativescriptError = hint . originalException ;
134132 // const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');
135133 const stack = parseErrorStack ( error ) ;
136- console . log ( 'stack' , stack ) ;
137- console . log ( 'event.exception?.values?.[0].stacktrace' , event . exception ?. values ?. [ 0 ] . stacktrace ) ;
138134 // console.log('stack', stack);
139135
140136
@@ -177,7 +173,6 @@ export class DebugSymbolicator implements Integration {
177173 * @param frames StackFrame[]
178174 */
179175 private _replaceFramesInEvent ( event : Event , frames : StackFrame [ ] ) : void {
180- console . log ( '_replaceFramesInEvent' ) ;
181176 if ( event . exception ?. values ?. [ 0 ] . stacktrace ) {
182177 event . exception . values [ 0 ] . stacktrace . frames = frames . reverse ( ) ;
183178 }
Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ export namespace NATIVE {
349349 enableNative : true ,
350350 autoInitializeNativeSdk : true ,
351351 ...originalOptions ,
352- } ;
352+ } as NativescriptOptions ;
353353 if ( ! options . enableNative ) {
354354 if ( options . enableNativeNagger ) {
355355 console . warn ( 'Note: Native Sentry SDK is disabled.' ) ;
@@ -477,6 +477,15 @@ export namespace NATIVE {
477477 // } else {
478478 // disableNativeFramesTracking();
479479 // }
480+ if ( options . enableFragmentLifecycleBreadcrumbs !== undefined || options . enableAutoFragmentLifecycleTracing !== undefined ) {
481+ config . addIntegration (
482+ new io . sentry . android . fragment . FragmentLifecycleIntegration (
483+ this ,
484+ options . enableFragmentLifecycleBreadcrumbs ?? true , // enabled by default
485+ options . enableAutoFragmentLifecycleTracing ?? false // disabled by default
486+ )
487+ ) ;
488+ }
480489
481490 // config.setEnableNdk(true);
482491 if ( enableNativeCrashHandling === false ) {
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ export namespace NATIVE {
306306 const options = {
307307 enableNative : true ,
308308 ...originalOptions ,
309- } ;
309+ } as NativescriptOptions ;
310310 if ( ! options . enableNative ) {
311311 if ( options . enableNativeNagger ) {
312312 console . warn ( 'Note: Native Sentry SDK is disabled.' ) ;
You can’t perform that action at this time.
0 commit comments