Skip to content

Conversation

@yousif-bugsnag
Copy link
Contributor

Goal

The current 500ms view load span timeout for native app starts sometimes isn’t long enough, particularly in debug builds where the React Native layer can take a long time to initialize.

This PR ups the default timeout to 5ms, and allows users to configure their own timeout via the ReactNativeAppStartPlugin constructor

Design

On Android, the timeout is an integer in milliseconds, while on Objective-C the timeout is an NSTimeInterval in seconds.

Android

BugsnagPerformance.start(PerformanceConfiguration.load(this).apply {
  addPlugin(ReactNativeAppStartPlugin(500))     // 500ms timeout
})

iOS

let config = BugsnagPerformanceConfiguration.loadConfig()
config.add(BugsnagReactNativeAppStartPlugin(timeout: 0.5)) // 500ms timeout
BugsnagPerformance.start(configuration: config)

Testing

Tested manually

@github-actions
Copy link

Browser bundle size

NPM build

Package
Before 234.62 kB
After 234.62 kB
± No change

CDN build

Unminified Minfied Minified + gzipped
Before 119.01 kB 45.94 kB 13.25 kB
After 119.01 kB 45.94 kB 13.25 kB
± No change No change No change

Code coverage

Coverage values did not change👌.

Total:

Lines Branches Functions Statements
84.67%(+0%) 61.91%(+0%) 75.43%(+0%) 81.5%(+0%)

Generated against 123600f on 21 November 2025 at 17:22:37 UTC

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