Skip to content

feat(spotlight): Disable spotlight in production builds#5673

Merged
antonis merged 3 commits intomainfrom
antonis/js-spotlight-protect
Feb 16, 2026
Merged

feat(spotlight): Disable spotlight in production builds#5673
antonis merged 3 commits intomainfrom
antonis/js-spotlight-protect

Conversation

@antonis
Copy link
Contributor

@antonis antonis commented Feb 16, 2026

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 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:

  • 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.

💡 Motivation and Context

Follow up to #5667

💚 How did you test it?

Manual, Unit tests

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

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>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against aca4a37

@antonis antonis added the ready-to-merge Triggers the full CI test suite label Feb 16, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 505.76 ms 538.39 ms 32.63 ms
Size 43.75 MiB 48.42 MiB 4.67 MiB

Baseline results on branch: main

Startup times

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

Previous results on branch: antonis/js-spotlight-protect

Startup times

Revision Plain With Sentry Diff
12203cb+dirty 402.88 ms 418.50 ms 15.62 ms

App size

Revision Plain With Sentry Diff
12203cb+dirty 43.75 MiB 48.41 MiB 4.66 MiB

@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1205.38 ms 1214.38 ms 9.00 ms
Size 3.38 MiB 4.78 MiB 1.40 MiB

Baseline results on branch: main

Startup times

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

Previous results on branch: antonis/js-spotlight-protect

Startup times

Revision Plain With Sentry Diff
12203cb+dirty 1209.18 ms 1218.15 ms 8.96 ms

App size

Revision Plain With Sentry Diff
12203cb+dirty 3.38 MiB 4.78 MiB 1.39 MiB

@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1213.35 ms 1216.21 ms 2.86 ms
Size 3.38 MiB 4.78 MiB 1.40 MiB

Baseline results on branch: main

Startup times

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

Previous results on branch: antonis/js-spotlight-protect

Startup times

Revision Plain With Sentry Diff
12203cb+dirty 1223.80 ms 1223.73 ms -0.07 ms

App size

Revision Plain With Sentry Diff
12203cb+dirty 3.38 MiB 4.78 MiB 1.39 MiB

@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 417.66 ms 454.98 ms 37.32 ms
Size 43.94 MiB 49.28 MiB 5.34 MiB

Baseline results on branch: main

Startup times

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

Previous results on branch: antonis/js-spotlight-protect

Startup times

Revision Plain With Sentry Diff
12203cb+dirty 432.58 ms 464.40 ms 31.82 ms

App size

Revision Plain With Sentry Diff
12203cb+dirty 43.94 MiB 49.27 MiB 5.33 MiB

@antonis antonis enabled auto-merge (squash) February 16, 2026 15:55
@antonis antonis merged commit 77271cd into main Feb 16, 2026
71 checks passed
@antonis antonis deleted the antonis/js-spotlight-protect branch February 16, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants