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
116116 integrations . push ( appRegistryIntegration ( ) ) ;
117117 integrations . push ( reactNativeTracingIntegration ( ) ) ;
118118 }
119- integrations . push ( timeToDisplayIntegration ( ) ) ;
119+ if ( hasTracingEnabled ) {
120+ integrations . push ( timeToDisplayIntegration ( ) ) ;
121+ }
120122 if ( options . enableCaptureFailedRequests ) {
121123 integrations . push ( httpClientIntegration ( ) ) ;
122124 }
Original file line number Diff line number Diff line change @@ -743,6 +743,22 @@ describe('Tests the SDK functionality', () => {
743743 } ) ;
744744 } ) ;
745745
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+
746762 it ( 'adds spotlight integration with spotlight bool' , ( ) => {
747763 init ( {
748764 spotlight : true ,
You can’t perform that action at this time.
0 commit comments