Skip to content

Commit 3572ac5

Browse files
Update docs/platforms/react-native/integrations/component-names.mdx
1 parent e402b88 commit 3572ac5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ The Sentry browser SDK will pick off the value from these `data` attributes and
7373

7474
## Troubleshooting
7575

76-
- If component names are missing in the reported events, check if the annotations are present in the JS bundle generated by Metro. You can text search in the bundle for the `data-sentry-component` key.
77-
- To add the annotations `config.transformer.babelTransformerPath` is required to be set in the Metro config before calling `withSentryConfig`.
78-
- Function `getSentryExpoConfig` returns the configuration with the Sentry Babel Transformer set, do not overwrite `config.transformer.babelTransformerPath`.
79-
- Use `export SENTRY_LOG_LEVEL=debug` to enable debug logs and observe if Sentry detected the default transformer and if Sentry Babel Transformer was executed.
76+
### Missing Component Names
8077

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.
8183
## Next Steps:
8284

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

0 commit comments

Comments
 (0)