Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw errors from attach when native SDK is not available #572

Conversation

yousif-bugsnag
Copy link
Contributor

Goal

Currently when attach is called, if the JS SDK cannot communicate with the native Android/Cocoa SDK, either because it hasn't been installed, is incompatible, or hasn't been started, we log a warning and noop.

But that means we don't call start on the JS client - so the native span delegation will be disabled, but customers can still then create JS spans, and these will just accumulate in memory (as they would if you start a span before start is called).

Instead, we should fail loudly and throw an error as this means something is misconfigured and the SDK cannot be started.

Also removed some unnecessary null checks around NativeBugsnagPerformance (since we now have a JS fallback)

Base automatically changed from PLAT-13414/native-integration-tests to integration/rn-native-integration January 22, 2025 17:33
@yousif-bugsnag yousif-bugsnag merged commit 9c595f0 into integration/rn-native-integration Jan 22, 2025
37 checks passed
@yousif-bugsnag yousif-bugsnag deleted the PLAT-13443/fail-loudly-on-attach branch January 22, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants