Integrating Sentry for mobile application error tracking

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Integrating Sentry for mobile application error tracking
Simple
~1 business day
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Integrating Sentry for mobile app error tracking

Sentry differs from Firebase Crashlytics in one key way — it tracks not just crashes, but performance: transactions, spans, slow HTTP requests, ANR/hang on UI thread. For applications where not just crashes matter but UX degradation, this makes Sentry more informative.

iOS: SPM connection

Add https://github.com/getsentry/sentry-cocoa to Package Dependencies, then in AppDelegate or @main:

import Sentry

SentrySDK.start { options in
    options.dsn = "https://<key>@sentry.io/<project>"
    options.environment = Bundle.main.object(forInfoDictionaryKey: "SentryEnvironment") as? String ?? "production"
    options.tracesSampleRate = 0.2  // 20% of transactions for performance
    options.profilesSampleRate = 0.1
    options.attachViewHierarchy = true  // view hierarchy snapshot on crash
}

attachViewHierarchy = true — useful feature: each crash report includes UIView/SwiftUI hierarchy tree at moment of crash. Immediately see which screen and UI state the crash occurred in.

Android: Gradle + Application

implementation("io.sentry:sentry-android:7.+")
// Application.onCreate()
SentryAndroid.init(this) { options ->
    options.dsn = "https://<key>@sentry.io/<project>"
    options.environment = BuildConfig.SENTRY_ENVIRONMENT
    options.tracesSampleRate = 0.2
    options.isEnableUserInteractionTracing = true  // auto-trace taps
}

isEnableUserInteractionTracing automatically creates transactions on user UI interaction. Without additional code see that "Checkout" button triggers 4.2-second network request on 3G.

Performance monitoring

// iOS: manual transaction
let transaction = SentrySDK.startTransaction(name: "checkout", operation: "ui.action")
let span = transaction.startChild(operation: "http.client", description: "POST /orders")
// ... request ...
span.finish()
transaction.finish()

Transactions appear in Performance section in Sentry. Shows p50/p75/p95/p99 percentiles, heatmap of slow requests and exact spans.

Custom tags and breadcrumbs

SentrySDK.configureScope { scope in
    scope.setUser(SentryUser(userId: userId))
    scope.setTag(value: "premium", key: "subscription")
    scope.addBreadcrumb({
        let crumb = Breadcrumb()
        crumb.message = "Opened shopping cart screen"
        crumb.category = "navigation"
        return crumb
    }())
}

Breadcrumbs — sequence of events before crash. Allow reconstructing user path without reproducing bug.

Source maps for React Native

If project is React Native — need to upload JS bundle source maps on each release:

npx sentry-cli releases \
  files "$VERSION" \
  upload-sourcemaps \
  --dist "$BUILD_NUMBER" \
  ./dist/bundle.js.map

Without source maps, RN crash stack trace looks like set of anonymous functions from minified bundle.

What's included in the work

  • Connecting sentry-cocoa / sentry-android / sentry-react-native
  • Configuring environments (dev / staging / production)
  • Performance tracing configuration with reasonable sample rate
  • Scope integration: User ID, tags, breadcrumbs
  • Configuring alerts on error rate and p95 latency
  • Upload dSYM / ProGuard mapping / JS source maps in CI

Timeline

Basic crash reporting integration: 0.5–1 day. Full performance tracing with custom transactions: 1–2 days. Cost calculated individually.