Repository navigation
feat(core): Support applicationKey and moduleMetadata in Metro config - #6863
Merged
Merged
Conversation
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
|
Inject the module metadata of @sentry/bundler-plugins as a virtual premodule, so thirdPartyErrorFilterIntegration can find the frames of the application. Export thirdPartyErrorFilterIntegration. Fixes #6858 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alwx
force-pushed
the
alwx/feature/6858
branch
from
October 9, 2026 09:36
e1bd076 to
e53db48
Compare
Add a test that shows that thirdPartyErrorFilterIntegration applies the injected module metadata on ReactNativeClient. Co-Authored-By: Claude <noreply@anthropic.com>
alwx
marked this pull request as ready for review
October 9, 2026 13:13
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4e05634. Configure here.
📲 Install BuildsAndroid
|
Contributor
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| a5d243c+dirty | 3842.35 ms | 1214.29 ms | -2628.06 ms |
| 6a3eb4c+dirty | 3854.77 ms | 1230.91 ms | -2623.86 ms |
| e763471+dirty | 3841.16 ms | 1218.06 ms | -2623.09 ms |
| 6acdf1d+dirty | 3844.33 ms | 1212.96 ms | -2631.38 ms |
| d61b289+dirty | 3874.56 ms | 1236.61 ms | -2637.94 ms |
| ab203f9+dirty | 3848.07 ms | 1219.71 ms | -2628.35 ms |
| 1a2e7e0+dirty | 3842.49 ms | 1220.04 ms | -2622.45 ms |
| 0307fa4+dirty | 3829.83 ms | 1212.15 ms | -2617.68 ms |
| 3a829f0+dirty | 3839.76 ms | 1214.69 ms | -2625.06 ms |
| 23598c3+dirty | 1207.00 ms | 1209.90 ms | 2.90 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| a5d243c+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| 6a3eb4c+dirty | 5.08 MiB | 6.68 MiB | 1.60 MiB |
| e763471+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| 6acdf1d+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| d61b289+dirty | 5.15 MiB | 6.95 MiB | 1.80 MiB |
| ab203f9+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| 1a2e7e0+dirty | 4.98 MiB | 6.46 MiB | 1.49 MiB |
| 0307fa4+dirty | 4.98 MiB | 6.46 MiB | 1.48 MiB |
| 3a829f0+dirty | 5.15 MiB | 6.70 MiB | 1.54 MiB |
| 23598c3+dirty | 3.38 MiB | 4.80 MiB | 1.42 MiB |
Contributor
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 0b1b5e3+dirty | 416.42 ms | 470.58 ms | 54.16 ms |
| a858ac3+dirty | 426.50 ms | 484.82 ms | 58.32 ms |
| 1a2e7e0+dirty | 416.61 ms | 445.46 ms | 28.85 ms |
| a216cb9+dirty | 458.66 ms | 531.47 ms | 72.81 ms |
| 88735e9+dirty | 429.04 ms | 484.17 ms | 55.13 ms |
| 20fbd51+dirty | 487.89 ms | 535.60 ms | 47.71 ms |
| 7a89652+dirty | 537.76 ms | 567.84 ms | 30.08 ms |
| a0a3177+dirty | 441.27 ms | 499.86 ms | 58.59 ms |
| 3d536d1+dirty | 524.34 ms | 547.32 ms | 22.98 ms |
| ed70c7f+dirty | 452.43 ms | 490.02 ms | 37.59 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 0b1b5e3+dirty | 48.30 MiB | 53.60 MiB | 5.29 MiB |
| a858ac3+dirty | 49.74 MiB | 55.08 MiB | 5.34 MiB |
| 1a2e7e0+dirty | 49.74 MiB | 54.82 MiB | 5.07 MiB |
| a216cb9+dirty | 49.74 MiB | 55.08 MiB | 5.34 MiB |
| 88735e9+dirty | 49.74 MiB | 54.82 MiB | 5.07 MiB |
| 20fbd51+dirty | 49.74 MiB | 54.81 MiB | 5.07 MiB |
| 7a89652+dirty | 48.30 MiB | 53.60 MiB | 5.30 MiB |
| a0a3177+dirty | 49.74 MiB | 55.37 MiB | 5.63 MiB |
| 3d536d1+dirty | 49.74 MiB | 55.26 MiB | 5.52 MiB |
| ed70c7f+dirty | 50.56 MiB | 56.62 MiB | 6.06 MiB |
Contributor
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bc8f61e+dirty | 419.31 ms | 453.39 ms | 34.08 ms |
| 0a9e622+dirty | 425.22 ms | 457.00 ms | 31.78 ms |
| bf168a4+dirty | 430.60 ms | 459.31 ms | 28.71 ms |
| 4953e94+dirty | 398.80 ms | 431.81 ms | 33.01 ms |
| 68ae91b+dirty | 515.04 ms | 578.08 ms | 63.04 ms |
| b9bebee+dirty | 500.50 ms | 536.42 ms | 35.92 ms |
| 3817909+dirty | 357.52 ms | 391.52 ms | 34.00 ms |
| 4e0ba9c+dirty | 421.39 ms | 455.80 ms | 34.41 ms |
| 635676f+dirty | 420.43 ms | 428.23 ms | 7.80 ms |
| be120d6+dirty | 514.67 ms | 543.17 ms | 28.49 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bc8f61e+dirty | 49.74 MiB | 55.09 MiB | 5.35 MiB |
| 0a9e622+dirty | 49.74 MiB | 55.09 MiB | 5.34 MiB |
| bf168a4+dirty | 49.74 MiB | 55.09 MiB | 5.35 MiB |
| 4953e94+dirty | 43.94 MiB | 48.94 MiB | 5.00 MiB |
| 68ae91b+dirty | 49.74 MiB | 54.79 MiB | 5.05 MiB |
| b9bebee+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
| 3817909+dirty | 43.94 MiB | 48.94 MiB | 5.00 MiB |
| 4e0ba9c+dirty | 48.30 MiB | 53.49 MiB | 5.19 MiB |
| 635676f+dirty | 50.56 MiB | 56.46 MiB | 5.90 MiB |
| be120d6+dirty | 49.74 MiB | 55.36 MiB | 5.62 MiB |
Contributor
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| b9bebee+dirty | 3858.02 ms | 1231.92 ms | -2626.11 ms |
| d771cd5+dirty | 3841.09 ms | 1224.64 ms | -2616.44 ms |
| 21a1e70+dirty | 3826.22 ms | 1217.74 ms | -2608.47 ms |
| a858ac3+dirty | 3850.72 ms | 1226.35 ms | -2624.37 ms |
| 41d6254+dirty | 3849.78 ms | 1233.91 ms | -2615.86 ms |
| 9ad4522+dirty | 3862.28 ms | 1226.27 ms | -2636.01 ms |
| 7d6fd3a+dirty | 1210.89 ms | 1217.63 ms | 6.74 ms |
| d0e3b3e+dirty | 3846.64 ms | 1226.27 ms | -2620.38 ms |
| d61b289+dirty | 3851.37 ms | 1229.59 ms | -2621.78 ms |
| 71abba0+dirty | 3852.70 ms | 1224.53 ms | -2628.16 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| b9bebee+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| d771cd5+dirty | 4.98 MiB | 6.55 MiB | 1.57 MiB |
| 21a1e70+dirty | 4.98 MiB | 6.46 MiB | 1.49 MiB |
| a858ac3+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| 41d6254+dirty | 5.15 MiB | 6.70 MiB | 1.54 MiB |
| 9ad4522+dirty | 4.98 MiB | 6.56 MiB | 1.58 MiB |
| 7d6fd3a+dirty | 3.38 MiB | 4.77 MiB | 1.39 MiB |
| d0e3b3e+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| d61b289+dirty | 5.15 MiB | 6.95 MiB | 1.80 MiB |
| 71abba0+dirty | 5.15 MiB | 6.67 MiB | 1.52 MiB |
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

📢 Type of change
📜 Description
This PR adds the
applicationKeyandmoduleMetadataoptions towithSentryConfigandgetSentryExpoConfig. The SDK injects the same module metadata snippet as@sentry/bundler-pluginsas a virtual premodule, also in development bundles and in each Expo chunk. The PR also exportsthirdPartyErrorFilterIntegrationfrom@sentry/react-native.💡 Motivation and Context
Without module metadata,
thirdPartyErrorFilterIntegrationsees every frame as third-party code, so adrop-…behavior drops all events. Fixes #6858.The snippet is a local copy, and a test pins it to
generateModuleMetadataInjectorCode. Only the object form ofmoduleMetadatais supported, because Metro does not know the org, project, or release.💚 How did you test it?
I added unit tests for the snippet, the metadata assembly, the serializer, the Expo plugin, and the Metro config options. All SDK and tool tests pass.
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Document the new options and the integration in the React Native docs.
🤖 Generated with Claude Code