Skip to content

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

Open
antonis wants to merge 2 commits intomainfrom
antonis/js-spotlight-protect
Open

feat(spotlight): Disable spotlight in production builds#5673
antonis wants to merge 2 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 d873104

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

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 402.88 ms 418.50 ms 15.62 ms
Size 43.75 MiB 48.41 MiB 4.66 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
f70acbf+dirty 373.39 ms 382.81 ms 9.43 ms
d9f44bb+dirty 400.64 ms 431.65 ms 31.01 ms
f3b058c+dirty 501.18 ms 536.70 ms 35.52 ms
8e653ac+dirty 360.28 ms 372.04 ms 11.76 ms
eb07ba3 470.04 ms 473.35 ms 3.31 ms
74979ac+dirty 444.68 ms 479.36 ms 34.68 ms
3bd3f0d+dirty 447.21 ms 472.31 ms 25.10 ms
785ffb1 471.92 ms 460.96 ms -10.96 ms
6416d6c+dirty 407.30 ms 422.00 ms 14.70 ms
ba75c7c 367.72 ms 369.16 ms 1.44 ms

App size

Revision Plain With Sentry Diff
f70acbf+dirty 17.75 MiB 19.68 MiB 1.94 MiB
d9f44bb+dirty 43.75 MiB 48.40 MiB 4.64 MiB
f3b058c+dirty 43.75 MiB 48.07 MiB 4.32 MiB
8e653ac+dirty 17.75 MiB 19.75 MiB 2.00 MiB
eb07ba3 17.75 MiB 20.15 MiB 2.41 MiB
74979ac+dirty 43.75 MiB 48.41 MiB 4.66 MiB
3bd3f0d+dirty 17.75 MiB 19.70 MiB 1.95 MiB
785ffb1 17.75 MiB 20.15 MiB 2.41 MiB
6416d6c+dirty 43.75 MiB 48.05 MiB 4.30 MiB
ba75c7c 17.75 MiB 20.15 MiB 2.41 MiB

@github-actions
Copy link
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1209.18 ms 1218.15 ms 8.96 ms
Size 3.38 MiB 4.78 MiB 1.39 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
9b50d32+dirty 1216.53 ms 1221.64 ms 5.10 ms
083f560+dirty 1227.33 ms 1242.02 ms 14.69 ms
7480abe+dirty 1220.53 ms 1244.18 ms 23.65 ms
d1bfbde+dirty 1216.83 ms 1212.83 ms -3.99 ms
a2bb688+dirty 1223.53 ms 1232.90 ms 9.37 ms
652f785+dirty 1219.66 ms 1223.62 ms 3.96 ms
6c36ba5+dirty 1214.56 ms 1216.52 ms 1.96 ms
9bf5446+dirty 1206.20 ms 1206.69 ms 0.48 ms
f081f58+dirty 1219.10 ms 1217.57 ms -1.53 ms
0dff710+dirty 1207.23 ms 1203.26 ms -3.97 ms

App size

Revision Plain With Sentry Diff
9b50d32+dirty 3.41 MiB 4.59 MiB 1.18 MiB
083f560+dirty 2.63 MiB 4.00 MiB 1.36 MiB
7480abe+dirty 2.63 MiB 3.96 MiB 1.33 MiB
d1bfbde+dirty 3.41 MiB 4.58 MiB 1.17 MiB
a2bb688+dirty 2.63 MiB 3.99 MiB 1.36 MiB
652f785+dirty 3.41 MiB 4.57 MiB 1.16 MiB
6c36ba5+dirty 3.38 MiB 4.60 MiB 1.22 MiB
9bf5446+dirty 3.41 MiB 4.59 MiB 1.18 MiB
f081f58+dirty 3.41 MiB 4.58 MiB 1.17 MiB
0dff710+dirty 3.44 MiB 4.59 MiB 1.15 MiB

@github-actions
Copy link
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1223.80 ms 1223.73 ms -0.07 ms
Size 3.38 MiB 4.78 MiB 1.39 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
9b50d32+dirty 1210.36 ms 1218.41 ms 8.05 ms
083f560+dirty 1215.27 ms 1231.96 ms 16.69 ms
7480abe+dirty 1219.84 ms 1223.60 ms 3.76 ms
d1bfbde+dirty 1221.30 ms 1218.70 ms -2.60 ms
a2bb688+dirty 1244.82 ms 1238.60 ms -6.22 ms
652f785+dirty 1216.42 ms 1212.21 ms -4.21 ms
6c36ba5+dirty 1208.55 ms 1207.38 ms -1.17 ms
9bf5446+dirty 1218.60 ms 1210.45 ms -8.15 ms
f081f58+dirty 1208.37 ms 1215.56 ms 7.19 ms
0dff710+dirty 1194.90 ms 1196.15 ms 1.25 ms

App size

Revision Plain With Sentry Diff
9b50d32+dirty 3.41 MiB 4.59 MiB 1.18 MiB
083f560+dirty 3.19 MiB 4.56 MiB 1.38 MiB
7480abe+dirty 3.19 MiB 4.53 MiB 1.35 MiB
d1bfbde+dirty 3.41 MiB 4.58 MiB 1.17 MiB
a2bb688+dirty 3.19 MiB 4.56 MiB 1.37 MiB
652f785+dirty 3.41 MiB 4.57 MiB 1.16 MiB
6c36ba5+dirty 3.38 MiB 4.60 MiB 1.22 MiB
9bf5446+dirty 3.41 MiB 4.59 MiB 1.18 MiB
f081f58+dirty 3.41 MiB 4.58 MiB 1.17 MiB
0dff710+dirty 3.44 MiB 4.59 MiB 1.15 MiB

@github-actions
Copy link
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 432.58 ms 464.40 ms 31.82 ms
Size 43.94 MiB 49.27 MiB 5.33 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
a206511+dirty 331.54 ms 356.98 ms 25.44 ms
8ff81c0+dirty 392.47 ms 431.52 ms 39.05 ms
170d5ea+dirty 348.79 ms 406.94 ms 58.15 ms
bb4ea33+dirty 360.73 ms 375.02 ms 14.29 ms
80e4616+dirty 427.31 ms 461.15 ms 33.84 ms
9a81842+dirty 508.08 ms 566.65 ms 58.56 ms
64cd15c+dirty 488.79 ms 483.54 ms -5.24 ms
6bd9054+dirty 376.24 ms 407.76 ms 31.52 ms
73f2455+dirty 369.33 ms 398.90 ms 29.57 ms
23080e5+dirty 347.29 ms 381.87 ms 34.58 ms

App size

Revision Plain With Sentry Diff
a206511+dirty 43.94 MiB 48.90 MiB 4.96 MiB
8ff81c0+dirty 43.94 MiB 48.87 MiB 4.93 MiB
170d5ea+dirty 7.15 MiB 8.42 MiB 1.27 MiB
bb4ea33+dirty 43.94 MiB 48.91 MiB 4.97 MiB
80e4616+dirty 43.94 MiB 49.38 MiB 5.44 MiB
9a81842+dirty 43.94 MiB 48.91 MiB 4.97 MiB
64cd15c+dirty 7.15 MiB 8.42 MiB 1.27 MiB
6bd9054+dirty 43.94 MiB 48.90 MiB 4.96 MiB
73f2455+dirty 43.94 MiB 48.82 MiB 4.88 MiB
23080e5+dirty 7.15 MiB 8.41 MiB 1.26 MiB

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.

1 participant