Skip to content

Commit a9dd3fc

Browse files
fix(timetodisplay): Change TimeToDisplay unsupported message from error to warning (#3699)
1 parent 5ce5307 commit a9dd3fc

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#760)
2424
- [diff](https://github.com/getsentry/sentry-java/compare/7.5.0...7.6.0)
2525

26+
### Fixes
27+
28+
- Change TimeToDisplay unsupported log from error to warning level. ([#3699](https://github.com/getsentry/sentry-react-native/pull/3699))
29+
2630
## 5.20.0
2731

2832
### Features

src/js/tracing/timetodisplay.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ function TimeToDisplay(props: {
6161

6262
if (__DEV__ && !nativeComponentMissingLogged && !nativeComponentExists) {
6363
nativeComponentMissingLogged = true;
64-
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');
64+
// Using setTimeout with a delay of 0 milliseconds to defer execution and avoid printing the React stack trace.
65+
setTimeout(() => {
66+
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');
67+
}, 0);
6568
}
6669

6770
const onDraw = (event: { nativeEvent: RNSentryOnDrawNextFrameEvent }): void => onDrawNextFrame(event);

0 commit comments

Comments
 (0)