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

Monitor Your App: A complete panel of Titanium ...

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.

Xavier Lacot

May 10, 2014
Tweet

More Decks by Xavier Lacot

Other Decks in Programming

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. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  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 33
  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 34
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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
  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 42
  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 43
  36. 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
  37. 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
  38. 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
  39. 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
  40. 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
  41. 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
  42. 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
  43. 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
  44. 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
  45. 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
  46. 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
  47. 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
  48. 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
  49. • 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
  50. • 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
  51. 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
  52. 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
  53. 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
  54. 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
  55. • 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