Monitor Your App: A complete panel of Titanium monitoring solutions

Monitor Your App: A complete panel of Titanium monitoring solutions

You have developed a great cross-platform application with Titanium, it has been shipped to the stores, and you are ready to get the money prize for your hard work. Great. How can you be sure that your app will be in a working shape everytime, everywhere, accross all the devices of the market?

This talk, given during TiConf US 2014, shows several techniques, native modules and libraries which help draw some idea of the reliability of mobile applications "in the real world". Collecting debug traces, watching the "live" trafic, being alerted when a specific API or a network resource becomes slowy: all these aspects help ensure that apps work well, for all the users.

D219d638498612dc190342584a0b1149?s=128

Xavier Lacot

May 10, 2014
Tweet

Transcript

  1. TiConf NY - Xavier Lacot - May 10th, 2014 Monitor

    Your App: A Complete Panel of Titanium Monitoring Solutions
  2. Hello, I am Xavier • Founder, Web- and Mobile- expert

    at JoliCode • Contributor to several Open Source projects • Titanium developer since 2009 • Speaker at CodeStrong 2011 and TiConf 2013 • Former President of the French Association of PHP Users • Co-organizer of the Titanium Paris meetup group @xavierlacot TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 2
  3. Being a Titanium developer...

  4. Titanium is a superb platform • develop fast • code

    once • publish on several platforms at once • have aggregated statistics It saved us and our clients lot of time and money TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 4
  5. Mobile apps evolve in a challenging context • various OS

    • device fragmentation • external dependancies • (usually) lower investments Running an app in a reliable way, always and accross all devices, is a hard job TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 5
  6. Many external dependancies • APIs • images and assets •

    Cloud services / social networks • in-app billing • adverts TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 6
  7. Mobile applications mean... • limited hardware (do not compute complicated

    things) • network-bounded (dependancy on APIs, etc): • do not make dozens of simulataneous http requests • earth-sized roundtrips are slow → server-side optims + a CDN • you must test on as many devices ans OS as you can Even with experience, you will sometimes forget about these rules. TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 7
  8. Bugs, slowness, etc., • ...are part of every piece of

    software's lifecycle • ...happen • whatever the amount of tests or your devotion to quality • ...are not a problem • ...as long as you detect them and react TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 8
  9. U said monitoring? • ensure most of the users are

    satisfied, everytime • detect bottlenecks and crashes • reproduce and analyse • improve / take action • test and ship TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 9
  10. U said monitoring? • ensure most of the users are

    satisfied, everytime • detect bottlenecks and crashes ← monitoring is here • reproduce and analyse • improve / take action • test and ship TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 10
  11. Several things to monitor (1/2) • Users amount How many

    customers use my apps? Do the userbase inscrease or decrease in time? • User bahavior and tracking How do the users behave? Can I optimize it (and earn more money/sell more)? “ TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 11
  12. Several things to monitor (2/2) • Performance / responsiveness Which

    parts of my app are slow? • Reliability and crashes collection Do some parts of my app crash (sometimes)? At which frequency? What are details about crashes? “ TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 12
  13. Monitoring the users

  14. TiAnalytics

  15. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 15
  16. Users TiConf 2014 - Monitor Your App: A Complete Panel

    of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 16
  17. Geography TiConf 2014 - Monitor Your App: A Complete Panel

    of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 17
  18. Evolution TiConf 2014 - Monitor Your App: A Complete Panel

    of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 18
  19. Pros / cons • allows cross-platform monitoring • works "out

    of the box" / avail. in Appcelerator Cloud Services ❤ < app   ti="http://ti.appcelerator.org">        ...        <guid>l337iSg00d-­‐j0l1-­‐c0de-­‐rUl3-­‐sT1t4n1Um</guid>        <analytics>true</analytics>        ... </ app> • cons / limits: • the web interface is laggy/buggy? • free version limited to 1,000,000 events/month ti: xmlns: ti: TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 19
  20. Google Analytics

  21. Dashboard TiConf 2014 - Monitor Your App: A Complete Panel

    of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 21
  22. Geography TiConf 2014 - Monitor Your App: A Complete Panel

    of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 22
  23. Real time TiConf 2014 - Monitor Your App: A Complete

    Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 23
  24. Pros / cons • available at https://github.com/MattTuttle/titanium-google-analytics • easy to

    implement var  GA  =  require('analytics.google'); var  tracker  =  GA.getTracker(token); tracker.trackScreen('homepage'); tracker.trackScreen('news'); tracker.trackEvent({        category:  'user_account',        action:  'upload_profile',        label:  'success' }); • not the "mobile reference"? TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 24
  25. Flurry Analytics

  26. Flurry Analytics • one of the major mobile analytics provider

    • OSS module (iOS only) available at https://github.com/appcelerator- modules/ti.flurry. Won't work • iOS and Android (not x86) at https://github.com/softgravity/titanium_flurry • Many features: • usage statistics • technical segmentation • crash collection TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 26
  27. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 27
  28. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 28
  29. Howto //  enable  Flurry  analytics var  flurry  =  require('sg.flurry'); flurry.secureTransport(true);

    flurry.logUncaughtExceptions(true); flurry.crashReportingEnabled(true); flurry.startSession('WVCDT3VDPJ6BRCJ6GJYS'); //  usage flurry.logEvent('hello',  {world:  'TiConf'}); flurry.logError('unknown  error',  'no  crash'); //  some  report  about  the  user flurry.setUserID(user.id); flurry.setAge(user.age); //  flurry.setGender(flurry.MALE); //  flurry.setLatitude(latitude,  longitude); flurry.logPageView();  ​ 6  ​  ​ 9 10 TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 29
  30. Lookback

  31. Lookback • Records the screen, gestures, face & voice of

    the users TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 31
  32. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 32
  33. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 33
  34. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 34
  35. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 35
  36. Howto • A Titanium module is available (iOS only). Thanks

    Stephen Feather! • https://github.com/sfeather/TiLookback • Usage: Ti.App.Properties.setString('LookbackAppToken',  'your_app_token'); var  Lookback  =  require('com.featherdirect.lookback'); Lookback.enableShakeToRecord(); Lookback.disableShakeToRecord(); //  etc. TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 36
  37. Monitoring performance and crashes

  38. NewRelic

  39. NewRelic • A very complete Web and mobile monitoring solution

    • Quite a standard since long on the Web side: • introspect server traces • compatible with many languages • A mobile offer since last year • And a Titanium module ❤ TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 39
  40. App overview TiConf 2014 - Monitor Your App: A Complete

    Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 40
  41. Network response time TiConf 2014 - Monitor Your App: A

    Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 41
  42. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 42
  43. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 43
  44. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 44
  45. Howto • enabling NewRelic is easy: var  newrelic  =  require('ti.newrelic');

    newrelic.start(newrelicToken); • caution, it crashes apps on iOS6- var  startNewRelic  =  function(newrelicToken)  {        var  version  =  Titanium.Platform.version.split(".");        var  major  =  parseInt(version[0],  10);        if  (!OS_IOS  ||  major  >=  7)  {                var  newrelic  =  require('ti.newrelic');                newrelic.start(newrelicToken);        } }; TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 45
  46. NewRelic • A must-have for mobile-monitoring • Several plans •

    the free one is convenient if you do not need data retention • building on Android is broken at the moment • temporary-solution gistsaver: https://gist.github.com/kennr/9698576 TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 46
  47. Crittercism

  48. Crittercism • A leader in the mobile app monitoring field

    • Features: • performance monitoring • crashes collection • data segmentation (geo / user / os / etc.) • alerts • realtime • Free up to 30K monthly users (limited features) • Included in Appcelerator Platform ("Performance Management") TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 48
  49. Crash TiConf 2014 - Monitor Your App: A Complete Panel

    of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 49
  50. Performance TiConf 2014 - Monitor Your App: A Complete Panel

    of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 50
  51. Alerts TiConf 2014 - Monitor Your App: A Complete Panel

    of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 51
  52. Few modules • (android only) in.shivakumars.crittercism does not seem maintained

    var  crittercism  =  require("in.shivakumars.crittercism"); crittercism.initializeCrittercism({        apiKey  :  "HERE_YOUR_KEY",        includeVersionName  :  false,        includeVersionCode  :  false,        userName  :  "xavier" }); • the "alloy crash test" app found on GitHub contains "com.crittercism.ti" modules for iOS and Android. Not tested. TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 52
  53. Pricing Basic Professional Pro Plus Price Free $1200/year $6000/year Crash

    details Live graphs Basic perf summary Crash trends Alerts Geolocation Data retention (perf / errors) 1 / 30 days 7 / 90 days unlimited * Limited to 10K active users/month. Larger plans → Price increase TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 53
  54. Bugsense

  55. Bugsense • Another big player in the mobile monitoring •

    Features: • crash analytics • crash search / segmentation • users churn and crashed correlation • crashes trends • Few Titanium modules available • Bugsense module on Appcelerator Marketplace, by Droisys Inc. Android Only TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 55
  56. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 56
  57. Howto (android only) • install the Bugsense module from the

    Marketplace • enabling Bugsense is easy: var  bugsense  =  require('com.droisys.bugsense'); bugsense.setup(bugsenseKey); • ... and it works: [INFO]    TiApplication:  (main)  [0,0]  checkpoint,  app  created. [INFO]    TiApplication:  (main)  [79,79]  Titanium  3.2.2  (2014/03/05  12:22  96e9a07 [INFO]    TiRootActivity:  (main)  [0,0]  checkpoint,  on  root  activity  create [INFO]    BugSenseHandler:  Registering  default  exceptions  handler [INFO]    homepage  ​ 4 TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 57
  58. Monitoring during the development

  59. Fix and deliver fast • Collect, identify and track crashes

    and bugs • Fix it • Deliver new versions How to reduce the bug-report / new delivery process? How to allow testers to be efficient? • Testflight, HockeyApp, Installr “ TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 59
  60. Testflight

  61. • A widespread solution to deliver new versions • Formerly

    iOS + Android, now iOS only → lost some of its usefulness for cross-platform apps TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 61
  62. HockeyApp

  63. • Features: • crash report with server-side symbolication • instant

    distribution • feedback collection • (simple) analytics • Ti module available: https://github.com/Rebelcorp/HockeyApp • no free plan. Starts at $100 / year TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 63
  64. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 64
  65. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 65
  66. TiConf 2014 - Monitor Your App: A Complete Panel of

    Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 66
  67. Howto • install the module: https://github.com/Rebelcorp/HockeyApp • enable it (iOS

    + android): <modules>        <module  platform="iphone">nl.rebelic.hockeyapp</module>        <module  platform="android">nl.rebelic.hockeyapp</module> </modules> • set up your account: var  hockeyapp  =  require('nl.rebelic.hockeyapp'); hockeyapp.start(''); TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 67
  68. Installr

  69. • Focuses on beta App Distribution • cross-platform • sync

    devices and provisioning with Apple Developer Portal • Prices depends on devices count (free up to 5 devices) TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions TiConf 2014 - Monitor Your App: A Complete Panel of Titanium Monitoring Solutions 69
  70. Xavier Lacot http://jolicode.com