Skip to content

Commit acd9c8f

Browse files
Add troubleshooting section to React Native Annotate Components page (#11462)
1 parent 08509ed commit acd9c8f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/platforms/react-native/integrations/component-names.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ Here's what the resulting node would look like if your bundler had applied the p
7171

7272
The Sentry browser SDK will pick off the value from these `data` attributes and collect them when your components are interacted with.
7373

74+
## Troubleshooting
75+
76+
### Missing Component Names
77+
78+
If component names are missing from reported events, it could be because the annotations we not added to the JS bundle. To troubleshoot this:
79+
80+
1. Check to see if the JS bundle generated by Metro has annotations by text searching for the `data-sentry-component` key in the bundle.
81+
2. If annotations are missing and you are using React Native without frameworks, check that `config.transformer.babelTransformerPath` is set before passing it to `withSentryConfig(config)`. If you are Expo user using `const config = getSentryExpoConfig(__dirname)` make sure the `config.transformer.babelTransformerPath` set by the `getSentryExpoConfig` is not overwritten.
82+
4. Use `export SENTRY_LOG_LEVEL=debug` to enable debug logs to verify that Sentry detected the default transformer and that the Sentry Babel Transformer was executed.
7483
## Next Steps:
7584

7685
- Lear more about Sentry's React Native [Metro bundler plugin](/platforms/react-native/manual-setup/metro/).

0 commit comments

Comments
 (0)