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

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.

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

    View Slide

  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

    View Slide

  3. Being a Titanium developer...

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  13. Monitoring
    the users

    View Slide

  14. TiAnalytics

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  19. Pros / cons
    • allows cross-platform monitoring
    • works "out of the box" / avail. in Appcelerator Cloud Services ❤
    < app   ti="http://ti.appcelerator.org">
           ...
           l337iSg00d-­‐j0l1-­‐c0de-­‐rUl3-­‐sT1t4n1Um
           true
           ...
    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

    View Slide

  20. Google Analytics

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  25. Flurry Analytics

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  30. Lookback

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  37. Monitoring
    performance
    and crashes

    View Slide

  38. NewRelic

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  47. Crittercism

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  54. Bugsense

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  58. Monitoring
    during the
    development

    View Slide

  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

    View Slide

  60. Testflight

    View Slide

  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

    View Slide

  62. HockeyApp

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  67. Howto
    • install the module: https://github.com/Rebelcorp/HockeyApp
    • enable it (iOS + android):

           nl.rebelic.hockeyapp
           nl.rebelic.hockeyapp

    • 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

    View Slide

  68. Installr

    View Slide

  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

    View Slide

  70. Xavier Lacot
    http://jolicode.com

    View Slide