diff --git a/CHANGELOG.md b/CHANGELOG.md index 1690d02168..be251a9bde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Add `getDefaultConfig` option to `getSentryExpoConfig` ([#3690](https://github.com/getsentry/sentry-react-native/pull/3690)) +### Fixes + +- Change TimeToDisplay unsupported log from error to warning level. ([#3699](https://github.com/getsentry/sentry-react-native/pull/3699)) + ## 5.20.0 ### Features diff --git a/src/js/tracing/timetodisplay.tsx b/src/js/tracing/timetodisplay.tsx index 528fce41e5..75fc92bedd 100644 --- a/src/js/tracing/timetodisplay.tsx +++ b/src/js/tracing/timetodisplay.tsx @@ -61,7 +61,10 @@ function TimeToDisplay(props: { if (__DEV__ && !nativeComponentMissingLogged && !nativeComponentExists) { nativeComponentMissingLogged = true; - logger.error('RNSentryOnDrawReporter is not available on the web, Expo Go and New Architecture. Run native build or report an issue at https://github.com/getsentry/sentry-react-native'); + // Using setTimeout with a delay of 0 milliseconds to defer execution and avoid printing the React stack trace. + setTimeout(() => { + logger.warn('TimeToInitialDisplay and TimeToFullDisplay are not supported on the web, Expo Go and New Architecture. Run native build or report an issue at https://github.com/getsentry/sentry-react-native'); + }, 0); } const onDraw = (event: { nativeEvent: RNSentryOnDrawNextFrameEvent }): void => onDrawNextFrame(event);