File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -141,14 +141,15 @@ class ReactNavigationV4Instrumentation extends RoutingInstrumentation {
141141 if ( ! this . _prevRoute || currentRoute . key !== this . _prevRoute . key ) {
142142 const context = this . _getTransactionContext ( currentRoute ) ;
143143
144- if ( this . _options . shouldSendTransaction ( currentRoute , this . _prevRoute ) ) {
145- this . onRouteWillChange ( context ) ;
146- } else {
144+ if ( ! this . _options . shouldSendTransaction ( currentRoute , this . _prevRoute ) ) {
145+ context . sampled = false ;
147146 logger . log (
148147 `[ReactNavigationV4Instrumentation] Will not send transaction "${ context . name } " due to shouldSendTransaction.`
149148 ) ;
150149 }
151150
151+ this . onRouteWillChange ( context ) ;
152+
152153 this . _prevRoute = currentRoute ;
153154 }
154155 }
You can’t perform that action at this time.
0 commit comments