File tree 1 file changed +10
-2
lines changed 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 {
374
374
const result = this . _callExtensionMethod < Transaction > ( 'startTransaction' , context , customSamplingContext ) ;
375
375
376
376
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':
379
386
Sentry.addTracingExtensions();
380
387
Sentry.init({...});
381
388
` ) ;
389
+ }
382
390
}
383
391
384
392
return result ;
You can’t perform that action at this time.
0 commit comments