Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Robust Observability for Mobile Apps & SDKs using Sentry

Robust Observability for Mobile Apps & SDKs using Sentry

Robust observability is an essential aspect of building and maintaining reliable mobile apps. It refers to the ability to monitor, measure, and understand the performance, health, and behavior of mobile apps in production. This talk will cover how mobile developers can build robust observability to quickly detect and diagnose issues, optimize performance, and improve the overall user experience using Sentry.

Here are some key considerations for this talk:

Logging: Implement comprehensive logging in your mobile app to capture relevant information about app events, errors, and performance metrics. Use logging frameworks or libraries that are appropriate for your mobile app platform (e.g., NSLog for iOS, Logcat for Android)

Monitoring: Set up monitoring tools and services to collect real-time data on key performance indicators (KPIs) such as app crashes, app start, errors, latency, and resource utilization.

Tracing: Implement distributed tracing to gain insights into your mobile app’s end-to-end performance and behavior. Distributed tracing allows you to trace requests and interactions across different mobile app components, including client-side and server-side components, and identify performance bottlenecks and dependencies.

Nsikak Thompson

June 16, 2023
Tweet

More Decks by Nsikak Thompson

Other Decks in Programming

Transcript

  1. Robust Observability for Mobile Apps & SDKs using Sentry Nsikak,

    Thompson Android Engineer, League https://github.com/EverlongProject/ sundae-android/pull/7071#discussi on_r1232528316
  2. Observability is a feature for improving user experience & driving

    growth. Observability is the ability to see what is happening in production on user device. or
  3. Networking Local Storage Sentry In-house Mobile App Networking Local Storage

    Sentry SDK Ext. SDK user Networking Local Storage Sentry Sentry
  4. Setup for App level SentryAndroid.init(this) { options -> options.dsn =

    “YOUR_DSN” } Module or SDK specific level private val options = SentryOptions().apply { dsn = “YOUR_DSN”} Val hub = Hub(options)
  5. Networking Local Storage Sentry In-house Mobile App Networking Local Storage

    Hub SDK Ext. SDK user Networking Local Storage Hub Sentry
  6. Logging • Fatal Errors. E.g ANRs • Non fatal Errors

    • Catched Exceptions • Screenshot try { throw new Exception("This is a test."); } catch (Exception e) { Sentry.captureException(e); }
  7. Performance Tracing • Cold & Warm App Startup time •

    Transaction Duration • Slow & Frozen Frames Rendering • UI load time
  8. Performance Tracing - Custom • Network Request response duration -

    HTTP, GraphQL • Database transactions - e.g insert, read , update
  9. Performance Tracing - Custom ITransaction transaction = Sentry.startTransaction("processOrderBatch()", "task"); try

    { processOrderBatch(); } catch (Exception e) { transaction.setThrowable(e); transaction.setStatus(SpanStatus.INTERNAL_ERROR); } finally { transaction.finish(); }
  10. Metrics - Sentry Dashboard Observability metrics are selected key performance

    indicators (KPIs) such as: • Error rates • Crash session rate • Unique User crash • Overall Startup time
  11. Features App SDK Custom Tracing Automatic Tracing - app startup

    time Crash Reporting - ANR Logging exceptions or message