File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -374,11 +374,19 @@ export class Hub implements HubInterface {
374374 const result = this . _callExtensionMethod < Transaction > ( 'startTransaction' , context , customSamplingContext ) ;
375375
376376 if ( __DEBUG_BUILD__ && ! result ) {
377- // eslint-disable-next-line no-console
378- console . warn ( `Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
377+ const client = this . getClient ( ) ;
378+ if ( ! client ) {
379+ // eslint-disable-next-line no-console
380+ console . warn (
381+ "Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'" ,
382+ ) ;
383+ } else {
384+ // eslint-disable-next-line no-console
385+ console . warn ( `Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
379386Sentry.addTracingExtensions();
380387Sentry.init({...});
381388` ) ;
389+ }
382390 }
383391
384392 return result ;
You can’t perform that action at this time.
0 commit comments