File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,9 @@ export function getDefaultIntegrations(options: ReactNativeClientOptions): Integ
116
116
integrations . push ( appRegistryIntegration ( ) ) ;
117
117
integrations . push ( reactNativeTracingIntegration ( ) ) ;
118
118
}
119
- integrations . push ( timeToDisplayIntegration ( ) ) ;
119
+ if ( hasTracingEnabled ) {
120
+ integrations . push ( timeToDisplayIntegration ( ) ) ;
121
+ }
120
122
if ( options . enableCaptureFailedRequests ) {
121
123
integrations . push ( httpClientIntegration ( ) ) ;
122
124
}
Original file line number Diff line number Diff line change @@ -743,6 +743,22 @@ describe('Tests the SDK functionality', () => {
743
743
} ) ;
744
744
} ) ;
745
745
746
+ describe ( 'time to display integration' , ( ) => {
747
+ it ( 'no integration when tracing disabled' , ( ) => {
748
+ init ( { } ) ;
749
+
750
+ expectNotIntegration ( 'TimeToDisplay' ) ;
751
+ } ) ;
752
+
753
+ it ( 'integration added when tracing enabled' , ( ) => {
754
+ init ( {
755
+ tracesSampleRate : 0.5 ,
756
+ } ) ;
757
+
758
+ expectIntegration ( 'TimeToDisplay' ) ;
759
+ } ) ;
760
+ } ) ;
761
+
746
762
it ( 'adds spotlight integration with spotlight bool' , ( ) => {
747
763
init ( {
748
764
spotlight : true ,
You can’t perform that action at this time.
0 commit comments