Bugsnag Integration for Mobile App Error Tracking
Bugsnag fills the niche between Crashlytics and Sentry: rich error grouping without the overhead of performance tracing. We use it on projects with 10k+ DAU, cutting triage time by 3x. Its core strength is an error grouping algorithm that intelligently clusters crashes by stack trace without creating a thousand issues from one bug with different memory addresses. The algorithm uses fuzzy matching—it clusters similar stack traces, ignoring differences in addresses and timestamps. This is especially critical for iOS, where ASLR changes addresses on every launch. With 8+ years in mobile development, we guarantee stability post-integration. Support cost savings reach 40% by reducing manual duplicate analysis, saving up to $2,000/month in DevOps time.
Why Bugsnag over Crashlytics?
Crashlytics is free, but its grouping is basic: duplicates require manual sorting. Bugsnag is 3x better at error grouping thanks to fuzzy matching. It also supports metadata tabs—we configure them to show app state without logs. Our clients save up to 30% debugging time after migrating from Crashlytics. Bugsnag also allows per-event severity, critical for triage: error events send alerts to PagerDuty, warnings go to a Slack digest. Such flexibility is unavailable in Crashlytics.
How to Configure Metadata for Rapid Diagnosis?
Metadata is structured in tabs within each bug report. Below is an example for iOS—the app_state section appears as a separate tab showing user, subscription, and cart.
Bugsnag.addOnSendError { event in event.addMetadata([ "user_id": userId, "subscription": "premium", "cart_items": cartCount ], section: "app_state") event.setUser(userId, withEmail: email, andName: name) return true } For Android, the configuration is similar—SDK initializes automatically at Application start. We recommend adding metadata in the addOnSendError callback to avoid blocking the main thread. Breadcrumbs are automatically logged on every significant user action, giving a full picture before a crash.
iOS Setup
// Package.swift or SPM in Xcode // <https://github.com/bugsnag/bugsnag-cocoa> import Bugsnag @main struct MyApp: App { init() { let config = BugsnagConfiguration.loadConfig() config.apiKey = "YOUR_API_KEY" config.releaseStage = Bundle.main.infoDictionary?["ReleaseStage"] as? String ?? "production" config.notifyReleaseStages = ["staging", "production"] Bugsnag.start(with: config) } } notifyReleaseStages is one of the first parameters to configure. Without it, debug builds clutter the dashboard with development events. Also remember to upload dSYM files for crash symbolication—done automatically via a build phase script.
Android Setup
implementation("com.bugsnag:bugsnag-android:5.+") Initialization with custom configuration:
val config = Configuration.load(this).apply { releaseStage = BuildConfig.RELEASE_STAGE enabledReleaseStages = setOf("staging", "production") maxBreadcrumbs = 50 } Bugsnag.start(this, config) For Android, it's critical to configure ProGuard/R8 mapping files—otherwise stack traces will be obfuscated. We integrate the bugsnag-android-gradle-plugin, which automatically uploads mappings during build.
Severity and Priority Management
Severity affects sorting in the dashboard and alerts. error triggers immediate notification, warning aggregates into a digest. We set severity per error type to never miss critical failures.
Bugsnag.notifyError(NetworkError.timeout) { event in event.severity = .warning event.context = "profile_image_load" return true } How Error Grouping Works in Detail
Bugsnag analyzes not only the exact stack but its structure: frame count, function names, exception types. Even when addresses differ, the algorithm finds common patterns. This merges errors that would appear as separate issues in Crashlytics. In practice, we see a 2–3x reduction in open issues after migration. For critical errors, grouping can be disabled via groupingHash.
Bugsnag vs Crashlytics: When to Choose Bugsnag
| Criteria | Bugsnag | Crashlytics |
|---|---|---|
| Error Grouping | Intelligent, customizable | Basic by stack trace |
| Metadata | Tabs with arbitrary structure | Key-value, flat |
| Free Plan | Up to 7,500 events/month | Free in Firebase |
| Self-hosted | No | No |
| Integrations | Jira, PagerDuty, Slack, GitHub | Firebase Console, Email |
Setup Time Comparison: Basic vs Full Integration
| Stage | Basic Integration | Full Integration |
|---|---|---|
| SDK Integration | 0.5 day | 0.5 day |
| Release Stage Configuration | 1 hour | 1 hour |
| Metadata and Breadcrumbs | — | 0.5 day |
| Alert Integration (Jira/Slack) | — | 0.5 day |
| dSYM / ProGuard Mapping Upload | 0.5 day | 0.5 day |
| Total | 0.5–1 day | 1–2 days |
What's Included
- SDK integration (iOS SPM / Android Gradle / Flutter / React Native)
- Release stage configuration and dev build filtering
- Metadata setup via
addOnSendError - Breadcrumbs and custom context configuration
- Integration with Jira or Slack for alerts
- dSYM (iOS) and ProGuard mapping (Android) upload
Contact us to discuss your project. We'll help you choose the optimal plan and configure Bugsnag for your stack. Request integration and receive a ready solution with stability guaranteed.
How Error Grouping Works (Click to Expand)
Bugsnag's algorithm examines frame count, function names, exception types, and stack structure to group similar crashes. This reduces duplicate issues by 2-3x compared to basic stack trace matching.
Source: Official Bugsnag documentation, Grouping section. https://docs.bugsnag.com/platforms/ios/grouping/







