Skip to content

Commit

Permalink
fix(timetodisplay): Change TimeToDisplay unsupported message from err…
Browse files Browse the repository at this point in the history
…or to warning (#3699)
  • Loading branch information
krystofwoldrich authored Apr 16, 2024
1 parent 5ce5307 commit a9dd3fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#760)
- [diff](https://github.com/getsentry/sentry-java/compare/7.5.0...7.6.0)

### Fixes

- Change TimeToDisplay unsupported log from error to warning level. ([#3699](https://github.com/getsentry/sentry-react-native/pull/3699))

## 5.20.0

### Features
Expand Down
5 changes: 4 additions & 1 deletion src/js/tracing/timetodisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a9dd3fc

Please sign in to comment.