feat(spotlight): Disable spotlight in production builds#5673
Merged
Conversation
Spotlight integration is now automatically disabled in production builds (when __DEV__ is false), even if explicitly enabled via the spotlight option. This prevents accidental inclusion of the development-only Spotlight tool in production releases, which would be non-functional (requires local Sidecar server) and could impact performance. Changes: - Add __DEV__ check in getDefaultIntegrations() to block spotlight in production - Update spotlight option documentation to clarify automatic disabling - Add comprehensive tests for spotlight integration behavior - Advanced users can still manually add spotlightIntegration() if needed Related to PR #5667 which makes native spotlight debug-only on Android. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Contributor
|
10 tasks
Contributor
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2f9fb30+dirty | 416.78 ms | 444.94 ms | 28.16 ms |
| 8d89cc9+dirty | 537.83 ms | 536.02 ms | -1.81 ms |
| 6fee48d+dirty | 407.42 ms | 437.71 ms | 30.29 ms |
| d751a5d+dirty | 434.24 ms | 486.08 ms | 51.84 ms |
| 05bef0e+dirty | 349.78 ms | 334.04 ms | -15.74 ms |
| f8d19f8+dirty | 422.98 ms | 421.98 ms | -1.00 ms |
| cd5f27f+dirty | 494.04 ms | 516.62 ms | 22.58 ms |
| 1ef8a04+dirty | 415.16 ms | 415.22 ms | 0.06 ms |
| 459a438+dirty | 417.09 ms | 406.52 ms | -10.57 ms |
| 5c16cdc+dirty | 423.48 ms | 452.35 ms | 28.88 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2f9fb30+dirty | 43.75 MiB | 48.05 MiB | 4.29 MiB |
| 8d89cc9+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
| 6fee48d+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
| d751a5d+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
| 05bef0e+dirty | 17.75 MiB | 19.70 MiB | 1.95 MiB |
| f8d19f8+dirty | 43.75 MiB | 48.08 MiB | 4.33 MiB |
| cd5f27f+dirty | 43.75 MiB | 48.41 MiB | 4.66 MiB |
| 1ef8a04+dirty | 43.75 MiB | 48.05 MiB | 4.29 MiB |
| 459a438+dirty | 17.75 MiB | 19.70 MiB | 1.95 MiB |
| 5c16cdc+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
Contributor
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 682f0f5+dirty | 1208.48 ms | 1212.46 ms | 3.98 ms |
| 817b2c1+dirty | 1211.96 ms | 1215.58 ms | 3.62 ms |
| 7be1f99+dirty | 1226.69 ms | 1217.76 ms | -8.93 ms |
| d081295+dirty | 1214.40 ms | 1211.27 ms | -3.13 ms |
| d73150f+dirty | 1198.44 ms | 1210.06 ms | 11.62 ms |
| ee69ed5+dirty | 1206.79 ms | 1213.98 ms | 7.19 ms |
| 5c16cdc+dirty | 1209.32 ms | 1210.67 ms | 1.35 ms |
| 5602cc4+dirty | 1216.49 ms | 1211.58 ms | -4.91 ms |
| 000da7a+dirty | 1214.31 ms | 1221.91 ms | 7.61 ms |
| d9f44bb+dirty | 1227.85 ms | 1226.00 ms | -1.85 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 682f0f5+dirty | 3.44 MiB | 4.59 MiB | 1.15 MiB |
| 817b2c1+dirty | 3.38 MiB | 4.60 MiB | 1.22 MiB |
| 7be1f99+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
| d081295+dirty | 3.41 MiB | 4.59 MiB | 1.18 MiB |
| d73150f+dirty | 3.38 MiB | 4.60 MiB | 1.22 MiB |
| ee69ed5+dirty | 3.41 MiB | 4.59 MiB | 1.18 MiB |
| 5c16cdc+dirty | 2.63 MiB | 3.96 MiB | 1.33 MiB |
| 5602cc4+dirty | 3.41 MiB | 4.67 MiB | 1.25 MiB |
| 000da7a+dirty | 2.63 MiB | 3.91 MiB | 1.28 MiB |
| d9f44bb+dirty | 3.38 MiB | 4.60 MiB | 1.22 MiB |
Contributor
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 682f0f5+dirty | 1208.22 ms | 1210.00 ms | 1.78 ms |
| 817b2c1+dirty | 1203.07 ms | 1207.15 ms | 4.08 ms |
| 7be1f99+dirty | 1222.43 ms | 1217.15 ms | -5.28 ms |
| d081295+dirty | 1205.24 ms | 1207.52 ms | 2.28 ms |
| d73150f+dirty | 1224.52 ms | 1227.17 ms | 2.65 ms |
| ee69ed5+dirty | 1212.78 ms | 1214.91 ms | 2.13 ms |
| 5c16cdc+dirty | 1235.67 ms | 1241.18 ms | 5.51 ms |
| 5602cc4+dirty | 1204.83 ms | 1212.47 ms | 7.64 ms |
| 000da7a+dirty | 1204.50 ms | 1218.94 ms | 14.44 ms |
| d9f44bb+dirty | 1205.74 ms | 1208.40 ms | 2.66 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 682f0f5+dirty | 3.44 MiB | 4.59 MiB | 1.15 MiB |
| 817b2c1+dirty | 3.38 MiB | 4.60 MiB | 1.22 MiB |
| 7be1f99+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
| d081295+dirty | 3.41 MiB | 4.59 MiB | 1.18 MiB |
| d73150f+dirty | 3.38 MiB | 4.60 MiB | 1.22 MiB |
| ee69ed5+dirty | 3.41 MiB | 4.59 MiB | 1.18 MiB |
| 5c16cdc+dirty | 3.19 MiB | 4.53 MiB | 1.34 MiB |
| 5602cc4+dirty | 3.41 MiB | 4.67 MiB | 1.25 MiB |
| 000da7a+dirty | 3.19 MiB | 4.48 MiB | 1.29 MiB |
| d9f44bb+dirty | 3.38 MiB | 4.60 MiB | 1.22 MiB |
Contributor
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6c11c6a+dirty | 462.02 ms | 488.50 ms | 26.48 ms |
| b80b14f+dirty | 320.33 ms | 376.06 ms | 55.73 ms |
| 05bef0e+dirty | 451.63 ms | 533.90 ms | 82.27 ms |
| c4e097a+dirty | 382.43 ms | 443.77 ms | 61.34 ms |
| 6c36ba5+dirty | 367.14 ms | 426.80 ms | 59.66 ms |
| cd5f27f+dirty | 388.19 ms | 447.42 ms | 59.23 ms |
| 136effd+dirty | 451.30 ms | 450.87 ms | -0.43 ms |
| 161947d+dirty | 349.27 ms | 435.09 ms | 85.82 ms |
| 2adbd1e+dirty | 366.13 ms | 419.49 ms | 53.36 ms |
| 180638b+dirty | 434.46 ms | 470.90 ms | 36.44 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6c11c6a+dirty | 43.94 MiB | 48.92 MiB | 4.98 MiB |
| b80b14f+dirty | 43.94 MiB | 48.87 MiB | 4.93 MiB |
| 05bef0e+dirty | 7.15 MiB | 8.43 MiB | 1.28 MiB |
| c4e097a+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 6c36ba5+dirty | 43.94 MiB | 49.27 MiB | 5.33 MiB |
| cd5f27f+dirty | 43.94 MiB | 49.27 MiB | 5.33 MiB |
| 136effd+dirty | 43.94 MiB | 48.81 MiB | 4.88 MiB |
| 161947d+dirty | 7.15 MiB | 8.43 MiB | 1.28 MiB |
| 2adbd1e+dirty | 7.15 MiB | 8.43 MiB | 1.28 MiB |
| 180638b+dirty | 43.94 MiB | 48.91 MiB | 4.97 MiB |
alwx
approved these changes
Feb 16, 2026
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
Spotlight integration is now automatically disabled in production builds (when DEV is false), even if explicitly enabled via the spotlight option.
This prevents accidental inclusion of the development-only Spotlight tool in production releases, which would be non-functional (requires local Sidecar server) and could impact performance.
Changes:
Related to PR #5667 which makes native spotlight debug-only on Android.
💡 Motivation and Context
Follow up to #5667
💚 How did you test it?
Manual, Unit tests
📝 Checklist
sendDefaultPIIis enabled🔮 Next steps
#skip-changelog