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 full-size 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 full-size slide

  3. Being a Titanium developer...

    View full-size 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 full-size 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 full-size 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 full-size 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 full-size 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 full-size 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 full-size 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 full-size 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 full-size 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 full-size slide

  13. Monitoring
    the users

    View full-size slide

  14. 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 full-size slide

  15. 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 full-size slide

  16. 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 full-size slide

  17. 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 full-size slide

  18. 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 full-size slide

  19. Google Analytics

    View full-size slide

  20. 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 full-size slide

  21. 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 full-size slide

  22. 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 full-size slide

  23. 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 full-size slide

  24. Flurry Analytics

    View full-size slide

  25. 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 full-size slide

  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 27

    View full-size 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 28

    View full-size slide

  28. 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 full-size slide

  29. 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 full-size slide

  30. 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 full-size slide

  31. 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 full-size 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 34

    View full-size 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 35

    View full-size slide

  34. 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 full-size slide

  35. Monitoring
    performance
    and crashes

    View full-size slide

  36. 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 full-size slide

  37. 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 full-size slide

  38. 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 full-size slide

  39. 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 full-size slide

  40. 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 full-size slide

  41. 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 full-size slide

  42. 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 full-size slide

  43. 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 full-size slide

  44. 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 full-size slide

  45. 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 full-size slide

  46. 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 full-size slide

  47. 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 full-size slide

  48. 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 full-size slide

  49. 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 full-size slide

  50. 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 full-size slide

  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 56

    View full-size slide

  52. 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 full-size slide

  53. Monitoring
    during the
    development

    View full-size slide

  54. 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 full-size slide

  55. • 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 full-size slide

  56. • 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 full-size slide

  57. 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 full-size slide

  58. 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 full-size slide

  59. 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 full-size slide

  60. 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 full-size slide

  61. • 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 full-size slide

  62. Xavier Lacot
    http://jolicode.com

    View full-size slide