SlideShare a Scribd company logo
1 of 141
Logging & Analytics
     For fun and profit
Let me tell you about a bug
Let me tell you about a bug


• ~2% of our customers were affected
Let me tell you about a bug


• ~2% of our customers were affected
• Resolved (WORKSFORME)
Let me tell you about a bug


• ~2% of our customers were affected
• Resolved (WORKSFORME)
• People will complain, but they won’t send
  me crash reports
Let me tell you about a bug


• ~2% of our customers were affected
• Resolved (WORKSFORME)
• People will complain, but they won’t send
  me crash reports
• Apple’s crash reporter shows no crashes
I wrote my own crash reporter
c
The confidence you get from finding out about every crash,
 anywhere in the world, is crucial to delivering a high quality
 product that needs to be used in the wild. For those of us in
  the consumer software business it's absolutely critical.You
can't rely on your customers to tell you about crashes—many
of them may not be technical enough, and most of them won't
 bother to take time off of their own important work to give
    you a useful crash report unless you make it completely
                    automatic. - Joel Spolsky
It’s 2012, don’t roll your own
         Use quincykit.net
And everybody lived
     happily ever after...
Until...
NSError *err = nil;
[somethingWithErr:&err];
if (err) {
  UIAlertView *errorAlertView =
  [[UIAlertView alloc]
  initWithTitle:@”Error” message:[err
  description] delegate:nil
  cancelButtonTitle:OK
  otherButtonTitles:nil];
  [errorAlertView show];
  [errorAlertView release];
}
NSError *err = nil;
[somethingWithErr:&err];
if (err) {
  UIAlertView *errorAlertView =
  [[UIAlertView alloc]
  initWithTitle:@”Error” message:[err
  description] delegate:nil
  cancelButtonTitle:OK
  otherButtonTitles:nil];
  [errorAlertView show];
  [errorAlertView release];
}
Or do I want one of these?
So I wrote an error logger
And everybody lived
     happily ever after...
Until...
I started maintaining
    non-iOS code



 http://github.com/drewcrawford/buildbot
I have too much noise
But not enough signal
But too much noise
But not enough signal
Within the same msg
Meanwhile...
How do I make money?

1. Customer hears about me
2. ????
3. Profit!
How do I make money?

1. Customer hears about me
2. ????              What’s going on here?
3. Profit!
Web Analytics
Web Analytics
• How many different times does a person
  visit my site before they convert?
Web Analytics
• How many different times does a person
  visit my site before they convert?
• How do my blog readers’ habits change
  over time?
Web Analytics
• How many different times does a person
  visit my site before they convert?
• How do my blog readers’ habits change
  over time?
• What indicators (referrers, time-on-site,
  months of loyalty) correlate to high quality
  users?
Web Analytics
• How many different times does a person
  visit my site before they convert?
• How do my blog readers’ habits change
  over time?
• What indicators (referrers, time-on-site,
  months of loyalty) correlate to high quality
  users?
• Can I prioritize sales leads automatically by
  their behavior on my site?
App Analytics
App Analytics
• Do websites, SEM ads, or product videos
  matter?
App Analytics
• Do websites, SEM ads, or product videos
  matter?
• What causes people to make an IAP?
App Analytics
• Do websites, SEM ads, or product videos
  matter?
• What causes people to make an IAP?
• Should the button be here or there?
App Analytics
• Do websites, SEM ads, or product videos
  matter?
• What causes people to make an IAP?
• Should the button be here or there?
• Is anyone really going to use this feature?
App Analytics
• Do websites, SEM ads, or product videos
  matter?
• What causes people to make an IAP?
• Should the button be here or there?
• Is anyone really going to use this feature?
• How many of my app users still use after 3
  days?
Nothing on this page
answers any questions
Anatomy of a useful page
Anatomy of a useful page
  HOW???
About Flurry
[FlurryAnalytics
startSession:@"1R1NQX1SPPWD7SDPI9WZ"];
    for(int i = 0; i < 5; i++) {
        [FlurryAnalytics logEvent:@"In for loop"
withParameters:[NSDictionary dictionaryWithObject:
[NSNumber numberWithInt:i] forKey:@"i"]];
    }
And then I waited
 several hours...
And all I got was
    this lousy summary
The world’s most
    worthless pie chart
In fairness, you can
export a few hundred records into Excel
But if you want full logs
       You’d better ask nicely
If only we had a machine
 that could process large quantities of data...
These are views
Not models. They draw pretty pictures. They’re not
                   your data.
It walks like raw data export
     It talks like raw data export
               But it’s not.

Look for yourself: http://mixpanel.com/docs/api-
  documentation/data-export-api#libs-python
We don't provide raw log exports at this
time. It is something we are considering
adding to our pipeline, so thanks for writing
in with the feature request. - Mixpanel
I’m not saying there’s a conspiracy to
keep you from getting real event logs
But don’t believe you can export your data until you
     actually download & check the damn logs
Meanwhile...
The epic unit test
•   I’m working on a complicated “big-data” project

•   The unit tests parse 100ks of points and take
    hours

•   When your compile-build-run-test loop is
    measured in hours, you debug from an execution
    trace, not by stepping through code

•   One day the 200MB+ execution traces wouldn’t
    upload to our bug tracker any more
The epic unit test

• I was building custom tools to parse through the
  huge log files and give me the info I needed to
  debug after-the-fact
• There’s a complicated system of macros
  controlling log levels of different components
The epic unit test

• Even with all these tools, rarely would I log the
  right things.
• Logging the wrong things costs me hours to re-
  run the test.
• Over and over again.
Bion has a similar problem




  on a different project
Meanwhile...
I read this article




http://journal.paul.querna.org/articles/2011/12/26/log-for-
                     machines-in-json/
What if instead of this


[Mon Dec 26 09:14:46 2011] [info] [client 50.57.61.4] File does
not exist: /var/www/no-such-file
We log this
{
    "timestamp": 1324830675.076,
    "status": "404",
    "short_message": "File does not exist: /var/www/no-such-file",
    "host": "ord1.product.api0",
    "facility": "httpd",
    "errno": "ENOENT",
    "remote_host": "50.57.61.4",
    "remote_port": "40100",
    "path": "/var/www/no-such-file",
    "uri": "/no-such-file",
    "level": 4,
    "headers": {
        "user-agent": "BadAgent/1.0",
        "connection": "close",
        "accept": "*/*"
    },
    "method": "GET",
    "unique_id": ".rh-g2Tm.h-ord1.product.api0.r-axAIO3bO.c-9210.ts-1324830675.v-24e946e"
}
And instead of logging
       to this
We log to this
Then I can query

• By any element in the JSON dictionary
• Across multiple tiers (client, server, web)
• Across platforms
• I can assign a unique ID to an iOS event
  and follow the API request across my whole
  stack
If it serves up all FB’s content
Pretty sure it can handle a few million print statements
Have you figured out
the common problem?
      we’re talking about




  EVENTS
•   printf / NSLog         •   e-mail received

•   server logs            •   sales inquiry

•   webapp logs            •   bug resolved

•   page view              •   User taps button

•   error                  •   unit test run

•   download notification   •   patch committed
Why do we need 10 systems
       to solve one problem?
Only four kinds of events


• Things logged only to stderr / console
• Things logged to a unified network log file
• Things somebody is notified about
• Things somebody gets woken up about
So about that server...
I’ve been playing with loggly

• So far, so good
• I downloaded the damn logs
• Events queryable in ~5s for me
• High-perf log import (raw sock available)
• Filter and query on a hadoop cluster console, a
  few gotchas but pretty neat
• I’m routlinely pushing up 100k events per day
  and I’m a tiny user
Searching by bug #
 across platforms
Do you really expect
me to build that dict?
 I just want to type NSLog(@”Something”);
The hardest part of this whole mess
        is figuring out what to log
           and actually logging it
Remember this?


 An event that happened three months ago can be the
most important thing to understand the events of today.
We can add state to
  our log statement

• dict.username = “Frank”
• log(“something”) //username=Frank
• log(“something”) //username=Frank

 To reduce the work
But we have to
 remember to undo it
• dict.username = “bill”
• begin_session(bill)
• log(“something”)
• begin_session(james)
• log(“something else”) //oops!
Kind of like memory
    management

• Balance malloc with free
• Balance retain with release
• Balance new with delete
But some memory is
   auto-managed
int i = 0;
{
    int j = 0;
    //can access j and i
}
//can access only i
Can we use a similar trick
    to build our logging dictionary?
JUCHE
      •   printf / NSLog
                           •   e-mail received


      •   server logs
                           •   sales inquiry


      •   webapp logs
                           •   bug resolved


      •   page view
                           •   User taps button


      •   error
                           •   unit test run


      •   download
                           •   patch committed
          notification


One library to rule them all
• iOS, Python
• iOS, Python
• Builds the dict with ease
• iOS, Python
• Builds the dict with ease
• Logs to stderr, loggly
Events are nested
Events are nested
        • Today
Events are nested
        • Today
         • Got up
Events are nested
        • Today
         • Got up
         • Made coffee
Events are nested
        • Today
         • Got up
         • Made coffee
         • Closed bugs
Events are nested
        • Today
         • Got up
         • Made coffee
         • Closed bugs
           • Bug 1
Events are nested
        • Today
         • Got up
         • Made coffee
         • Closed bugs
           • Bug 1
           • Bug 2
Events are nested
        • Today
         • Got up
         • Made coffee
         • Closed bugs
           • Bug 1
           • Bug 2
         • Had lunch
Events are scoped
                    • Today
                     • Got up
                     • Made coffee
                     • Closed bugs
                       • Bug 1
                       • Bug 2
                     • Had lunch
Inner items inherit the settings of outer items
for(int i = 0; i < 3; i++) {
            [JucheLog revolt:@"i",[NSString
stringWithFormat:@"%d",i],^{
                    JUCHE(JINFO,@"My awesome
loop");
              }];
          }
for(int i = 0; i < 3; i++) {

             [JucheLog revolt:@"i",[NSString stringWithFormat:@"%d",i],^{

                   JUCHE(JINFO,@"My awesome loop");

             }];

        }

|   [INFO] 19:12:11 My awesome loop i=0    juchelog.py:142

|   [INFO] 19:12:11 My awesome loop i=1    juchelog.py:142

|   [INFO] 19:12:11 My awesome loop i=2    juchelog.py:142
for i in range(0,3):

           with juche.revolution(i=i,eternal_president="kim-il-sun"):

               juche.info("Outer loop!")

               for j in range(0,2):

                    with juche.revolution(j=j):

                         juche.info("Inner loop!")

|   [INFO] 19:12:11 Outer loop! i=0 eternal_president=kim-il-sun   juchelog.py:147

|   |   [INFO] 19:12:11 Inner loop! j=0   juchelog.py:150

|   |   [INFO] 19:12:11 Inner loop! j=1   juchelog.py:150

|   [INFO] 19:12:11 Outer loop! i=1 eternal_president=kim-il-sun   juchelog.py:147

|   |   [INFO] 19:12:11 Inner loop! j=0   juchelog.py:150

|   |   [INFO] 19:12:11 Inner loop! j=1   juchelog.py:150

|   [INFO] 19:12:11 Outer loop! i=2 eternal_president=kim-il-sun   juchelog.py:147

|   |   [INFO] 19:12:11 Inner loop! j=0   juchelog.py:150

|   |   [INFO] 19:12:11 Inner loop! j=1   juchelog.py:150
|   [INFO] 19:12:11 Outer loop! i=0 eternal_president=kim-il-sun   juchelog.py:147

|   |   [INFO] 19:12:11 Inner loop! j=0   juchelog.py:150

|   |   [INFO] 19:12:11 Inner loop! j=1   juchelog.py:150

|   [INFO] 19:12:11 Outer loop! i=1 eternal_president=kim-il-sun   juchelog.py:147

|   |   [INFO] 19:12:11 Inner loop! j=0   juchelog.py:150

|   |   [INFO] 19:12:11 Inner loop! j=1   juchelog.py:150

|   [INFO] 19:12:11 Outer loop! i=2 eternal_president=kim-il-sun   juchelog.py:147

|   |   [INFO] 19:12:11 Inner loop! j=0   juchelog.py:150

|   |   [INFO] 19:12:11 Inner loop! j=1   juchelog.py:150



{"function": "__block_global_0", "who": "G88014V4XYK", "indent": "2",
"thread": "main", "eternal_president": "kim-il-sun", "i": "2", "app":
"com.dca.JucheLogTestMac", "j": "2", "version": "1", "file":
"JucheLogTests.m", "msg": "Inner loop!", "line": "44", "level":
"info"}
Call for contributors




http://github.com/drewcrawford/JucheLog
Call for contributors
                             Use the library




http://github.com/drewcrawford/JucheLog
Call for contributors
                               Use the library
                      See if it solves your problems




http://github.com/drewcrawford/JucheLog
Call for contributors
                               Use the library
                      See if it solves your problems
                            Critique the syntax




http://github.com/drewcrawford/JucheLog
Call for contributors
                               Use the library
                      See if it solves your problems
                            Critique the syntax
                      Critique the terminal output




http://github.com/drewcrawford/JucheLog
Call for contributors
                               Use the library
                      See if it solves your problems
                            Critique the syntax
                      Critique the terminal output
                        Port it to (PHP, RoR, JS...)




http://github.com/drewcrawford/JucheLog
Call for contributors
                               Use the library
                      See if it solves your problems
                            Critique the syntax
                      Critique the terminal output
                        Port it to (PHP, RoR, JS...)
                      Write convenience functions




http://github.com/drewcrawford/JucheLog
Call for contributors
                               Use the library
                      See if it solves your problems
                            Critique the syntax
                      Critique the terminal output
                        Port it to (PHP, RoR, JS...)
                      Write convenience functions
                           “Log every Y times”




http://github.com/drewcrawford/JucheLog
Call for contributors
                               Use the library
                      See if it solves your problems
                            Critique the syntax
                      Critique the terminal output
                        Port it to (PHP, RoR, JS...)
                      Write convenience functions
                           “Log every Y times”
                             Log+UIAlertView




http://github.com/drewcrawford/JucheLog
Call for contributors
                               Use the library
                      See if it solves your problems
                            Critique the syntax
                      Critique the terminal output
                        Port it to (PHP, RoR, JS...)
                      Write convenience functions
                           “Log every Y times”
                             Log+UIAlertView
                       Log more types (NSError)



http://github.com/drewcrawford/JucheLog
Call for contributors
                               Use the library
                      See if it solves your problems
                            Critique the syntax
                      Critique the terminal output
                        Port it to (PHP, RoR, JS...)
                      Write convenience functions
                           “Log every Y times”
                             Log+UIAlertView
                       Log more types (NSError)
                           streamlined opt-out


http://github.com/drewcrawford/JucheLog
So how evil is this?
I am not a lawyer
  And this is not legal advice
17.1 Apps cannot transmit data about a user without
obtaining the user's prior permission and providing the
user with access to information about how and where
                 the data will be used
Your EULA says
   Consent to Use of Data:You agree that Application
Provider may collect and use technical data and related
    information, including but not limited to technical
 information about Your device, system and application
 software, and peripherals, that is gathered periodically
 to facilitate the provision of software updates, product
support and other services to You (if any) related to the
 Licensed Application. Application Provider may use this
   information, as long as it is in a form that does not
  personally identify You, to improve its products or to
          provide services or technologies to You.
Don’t be evil
I use data
I use data
• To diagnose and fix bugs and crashes
I use data
• To diagnose and fix bugs and crashes
• To learn where users are getting stuck
I use data
• To diagnose and fix bugs and crashes
• To learn where users are getting stuck
• To learn what percentage of my customer
  base experiences issues
I use data
• To diagnose and fix bugs and crashes
• To learn where users are getting stuck
• To learn what percentage of my customer
  base experiences issues
• To plan new features and updates
I use data
• To diagnose and fix bugs and crashes
• To learn where users are getting stuck
• To learn what percentage of my customer
  base experiences issues
• To plan new features and updates
• To A/B test and see what people like
I use data
• To diagnose and fix bugs and crashes
• To learn where users are getting stuck
• To learn what percentage of my customer
  base experiences issues
• To plan new features and updates
• To A/B test and see what people like
• To understand my customers’ needs
I use data
• To diagnose and fix bugs and crashes
• To learn where users are getting stuck
• To learn what percentage of my customer
  base experiences issues
• To plan new features and updates
• To A/B test and see what people like
• To understand my customers’ needs
• Always for the benefit of the users
Not to sell to someone else
(Don’t even log personal data)
So
Get a good signal
Turn down the noise
Try out Juche
http://github.com/drewcrawford/JucheLog
Look for common problems
     and build common solutions
•   Tiny iOS Developer

•   Mix of contracts &
    products

•   Many other dev tools
    like JucheLog
Drew Crawford
http://drewcrawfordapps.com
drew@drewcrawfordapps.com


http://sealedabstract.com <--you should be reading this

More Related Content

What's hot

Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...seleniumconf
 
You can detect PowerShell attacks
You can detect PowerShell attacksYou can detect PowerShell attacks
You can detect PowerShell attacksMichael Gough
 
Info sec is not daunting v1.0
Info sec is not daunting v1.0 Info sec is not daunting v1.0
Info sec is not daunting v1.0 Michael Gough
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With JestBen McCormick
 
A journey beyond the page object pattern
A journey beyond the page object patternA journey beyond the page object pattern
A journey beyond the page object patternRiverGlide
 
Ask a Malware Archaeologist
Ask a Malware ArchaeologistAsk a Malware Archaeologist
Ask a Malware ArchaeologistMichael Gough
 
Getting root with benign app store apps vsecurityfest
Getting root with benign app store apps vsecurityfestGetting root with benign app store apps vsecurityfest
Getting root with benign app store apps vsecurityfestCsaba Fitzl
 
Predicting Defects for Eclipse
Predicting Defects for EclipsePredicting Defects for Eclipse
Predicting Defects for EclipseTim Menzies
 
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All ProgrammersHow WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All ProgrammersJeff Lindsay
 
Proper logging can catch breaches like retail PoS
Proper logging can catch breaches like retail PoSProper logging can catch breaches like retail PoS
Proper logging can catch breaches like retail PoSMichael Gough
 
MonoRails - GoGaRuCo 2012
MonoRails - GoGaRuCo 2012MonoRails - GoGaRuCo 2012
MonoRails - GoGaRuCo 2012jackdanger
 
DIR ISF - Email keeps getting us pwned v1.1
DIR ISF - Email keeps getting us pwned v1.1DIR ISF - Email keeps getting us pwned v1.1
DIR ISF - Email keeps getting us pwned v1.1Michael Gough
 
APIs That Make Things Happen
APIs That Make Things HappenAPIs That Make Things Happen
APIs That Make Things HappenJeff Lindsay
 
APIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsAPIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsSauce Labs
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaGeorge Wilson
 
GitHub Slack Bot
GitHub Slack BotGitHub Slack Bot
GitHub Slack BotPriti Desai
 
Offline Webapps
Offline Webapps Offline Webapps
Offline Webapps mnitchie
 
eMusic: WordPress in the Enterprise
eMusic: WordPress in the EnterpriseeMusic: WordPress in the Enterprise
eMusic: WordPress in the EnterpriseScott Taylor
 
Best Practices in SharePoint Development - Just Freakin Work! Overcoming Hurd...
Best Practices in SharePoint Development - Just Freakin Work! Overcoming Hurd...Best Practices in SharePoint Development - Just Freakin Work! Overcoming Hurd...
Best Practices in SharePoint Development - Just Freakin Work! Overcoming Hurd...Geoff Varosky
 

What's hot (20)

Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
 
You can detect PowerShell attacks
You can detect PowerShell attacksYou can detect PowerShell attacks
You can detect PowerShell attacks
 
Info sec is not daunting v1.0
Info sec is not daunting v1.0 Info sec is not daunting v1.0
Info sec is not daunting v1.0
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With Jest
 
A journey beyond the page object pattern
A journey beyond the page object patternA journey beyond the page object pattern
A journey beyond the page object pattern
 
Ask a Malware Archaeologist
Ask a Malware ArchaeologistAsk a Malware Archaeologist
Ask a Malware Archaeologist
 
Getting root with benign app store apps vsecurityfest
Getting root with benign app store apps vsecurityfestGetting root with benign app store apps vsecurityfest
Getting root with benign app store apps vsecurityfest
 
Predicting Defects for Eclipse
Predicting Defects for EclipsePredicting Defects for Eclipse
Predicting Defects for Eclipse
 
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All ProgrammersHow WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All Programmers
 
Proper logging can catch breaches like retail PoS
Proper logging can catch breaches like retail PoSProper logging can catch breaches like retail PoS
Proper logging can catch breaches like retail PoS
 
MonoRails - GoGaRuCo 2012
MonoRails - GoGaRuCo 2012MonoRails - GoGaRuCo 2012
MonoRails - GoGaRuCo 2012
 
DIR ISF - Email keeps getting us pwned v1.1
DIR ISF - Email keeps getting us pwned v1.1DIR ISF - Email keeps getting us pwned v1.1
DIR ISF - Email keeps getting us pwned v1.1
 
APIs That Make Things Happen
APIs That Make Things HappenAPIs That Make Things Happen
APIs That Make Things Happen
 
APIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsAPIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page Objects
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and Joomla
 
GitHub Slack Bot
GitHub Slack BotGitHub Slack Bot
GitHub Slack Bot
 
Offline Webapps
Offline Webapps Offline Webapps
Offline Webapps
 
eMusic: WordPress in the Enterprise
eMusic: WordPress in the EnterpriseeMusic: WordPress in the Enterprise
eMusic: WordPress in the Enterprise
 
DevSec Defense
DevSec DefenseDevSec Defense
DevSec Defense
 
Best Practices in SharePoint Development - Just Freakin Work! Overcoming Hurd...
Best Practices in SharePoint Development - Just Freakin Work! Overcoming Hurd...Best Practices in SharePoint Development - Just Freakin Work! Overcoming Hurd...
Best Practices in SharePoint Development - Just Freakin Work! Overcoming Hurd...
 

Viewers also liked

SEIC - Pipeline Modelling Software for GAS
SEIC - Pipeline Modelling Software for GASSEIC - Pipeline Modelling Software for GAS
SEIC - Pipeline Modelling Software for GASLetizia Conter
 
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)James Clause
 
SOG data: Understanding Data as Information
SOG data: Understanding Data as InformationSOG data: Understanding Data as Information
SOG data: Understanding Data as InformationMicheleTyler
 
iwa_guidance_notes_on_leak_detection_and_repair_2007
iwa_guidance_notes_on_leak_detection_and_repair_2007iwa_guidance_notes_on_leak_detection_and_repair_2007
iwa_guidance_notes_on_leak_detection_and_repair_2007Stuart Stapely
 
American Leak Detection - Description of Services
American Leak Detection - Description of ServicesAmerican Leak Detection - Description of Services
American Leak Detection - Description of ServicesJoshua Butler
 

Viewers also liked (7)

Snl 5 white paper
Snl 5 white paperSnl 5 white paper
Snl 5 white paper
 
SEIC - Pipeline Modelling Software for GAS
SEIC - Pipeline Modelling Software for GASSEIC - Pipeline Modelling Software for GAS
SEIC - Pipeline Modelling Software for GAS
 
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)
 
SOG data: Understanding Data as Information
SOG data: Understanding Data as InformationSOG data: Understanding Data as Information
SOG data: Understanding Data as Information
 
iwa_guidance_notes_on_leak_detection_and_repair_2007
iwa_guidance_notes_on_leak_detection_and_repair_2007iwa_guidance_notes_on_leak_detection_and_repair_2007
iwa_guidance_notes_on_leak_detection_and_repair_2007
 
American Leak Detection - Description of Services
American Leak Detection - Description of ServicesAmerican Leak Detection - Description of Services
American Leak Detection - Description of Services
 
Nmr Course
Nmr CourseNmr Course
Nmr Course
 

Similar to Cross-platform logging and analytics

Generative Testing in Clojure
Generative Testing in ClojureGenerative Testing in Clojure
Generative Testing in ClojureAlistair Roche
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSencha
 
Legal and efficient web app testing without permission
Legal and efficient web app testing without permissionLegal and efficient web app testing without permission
Legal and efficient web app testing without permissionAbraham Aranguren
 
Opslogger: Operations code (should be) production quality too!
Opslogger: Operations code (should be) production quality too!Opslogger: Operations code (should be) production quality too!
Opslogger: Operations code (should be) production quality too!Sean Reilly
 
Advanced Error Handling Strategies for ColdFusion
Advanced Error Handling Strategies for ColdFusion Advanced Error Handling Strategies for ColdFusion
Advanced Error Handling Strategies for ColdFusion Mary Jo Sminkey
 
Velocity building a performance lab for mobile apps in a day - final
Velocity   building a performance lab for mobile apps in a day - finalVelocity   building a performance lab for mobile apps in a day - final
Velocity building a performance lab for mobile apps in a day - finalAshray Mathur
 
Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Brian Brazil
 
Abraham aranguren. legal and efficient web app testing without permission
Abraham aranguren. legal and efficient web app testing without permissionAbraham aranguren. legal and efficient web app testing without permission
Abraham aranguren. legal and efficient web app testing without permissionYury Chemerkin
 
Automated Exploratory Testing
Automated Exploratory TestingAutomated Exploratory Testing
Automated Exploratory TestingJustin Ison
 
Justin Ison
Justin IsonJustin Ison
Justin IsonCodeFest
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web appsChris Mills
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeededm00se
 
OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl
OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl
OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl OpenNebula Project
 
Monitoring of OpenNebula installations
Monitoring of OpenNebula installationsMonitoring of OpenNebula installations
Monitoring of OpenNebula installationsNETWAYS
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsGraham Dumpleton
 
Owasp tds
Owasp tdsOwasp tds
Owasp tdssnyff
 
Cloud Foundry API for Fun and Ops
Cloud Foundry API for Fun and OpsCloud Foundry API for Fun and Ops
Cloud Foundry API for Fun and OpsChris DeLashmutt
 
JavaOne 2015: Top Performance Patterns Deep Dive
JavaOne 2015: Top Performance Patterns Deep DiveJavaOne 2015: Top Performance Patterns Deep Dive
JavaOne 2015: Top Performance Patterns Deep DiveAndreas Grabner
 
Making operations visible - Nick Gallbreath
Making operations visible - Nick GallbreathMaking operations visible - Nick Gallbreath
Making operations visible - Nick GallbreathDevopsdays
 

Similar to Cross-platform logging and analytics (20)

Generative Testing in Clojure
Generative Testing in ClojureGenerative Testing in Clojure
Generative Testing in Clojure
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
 
Legal and efficient web app testing without permission
Legal and efficient web app testing without permissionLegal and efficient web app testing without permission
Legal and efficient web app testing without permission
 
Opslogger: Operations code (should be) production quality too!
Opslogger: Operations code (should be) production quality too!Opslogger: Operations code (should be) production quality too!
Opslogger: Operations code (should be) production quality too!
 
Advanced Error Handling Strategies for ColdFusion
Advanced Error Handling Strategies for ColdFusion Advanced Error Handling Strategies for ColdFusion
Advanced Error Handling Strategies for ColdFusion
 
Velocity building a performance lab for mobile apps in a day - final
Velocity   building a performance lab for mobile apps in a day - finalVelocity   building a performance lab for mobile apps in a day - final
Velocity building a performance lab for mobile apps in a day - final
 
Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)
 
Abraham aranguren. legal and efficient web app testing without permission
Abraham aranguren. legal and efficient web app testing without permissionAbraham aranguren. legal and efficient web app testing without permission
Abraham aranguren. legal and efficient web app testing without permission
 
Automated Exploratory Testing
Automated Exploratory TestingAutomated Exploratory Testing
Automated Exploratory Testing
 
Drupal 7 ci and testing
Drupal 7 ci and testingDrupal 7 ci and testing
Drupal 7 ci and testing
 
Justin Ison
Justin IsonJustin Ison
Justin Ison
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web apps
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 
OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl
OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl
OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl
 
Monitoring of OpenNebula installations
Monitoring of OpenNebula installationsMonitoring of OpenNebula installations
Monitoring of OpenNebula installations
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web Applications
 
Owasp tds
Owasp tdsOwasp tds
Owasp tds
 
Cloud Foundry API for Fun and Ops
Cloud Foundry API for Fun and OpsCloud Foundry API for Fun and Ops
Cloud Foundry API for Fun and Ops
 
JavaOne 2015: Top Performance Patterns Deep Dive
JavaOne 2015: Top Performance Patterns Deep DiveJavaOne 2015: Top Performance Patterns Deep Dive
JavaOne 2015: Top Performance Patterns Deep Dive
 
Making operations visible - Nick Gallbreath
Making operations visible - Nick GallbreathMaking operations visible - Nick Gallbreath
Making operations visible - Nick Gallbreath
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Cross-platform logging and analytics

  • 1. Logging & Analytics For fun and profit
  • 2. Let me tell you about a bug
  • 3. Let me tell you about a bug • ~2% of our customers were affected
  • 4. Let me tell you about a bug • ~2% of our customers were affected • Resolved (WORKSFORME)
  • 5. Let me tell you about a bug • ~2% of our customers were affected • Resolved (WORKSFORME) • People will complain, but they won’t send me crash reports
  • 6. Let me tell you about a bug • ~2% of our customers were affected • Resolved (WORKSFORME) • People will complain, but they won’t send me crash reports • Apple’s crash reporter shows no crashes
  • 7. I wrote my own crash reporter
  • 8.
  • 9. c
  • 10. The confidence you get from finding out about every crash, anywhere in the world, is crucial to delivering a high quality product that needs to be used in the wild. For those of us in the consumer software business it's absolutely critical.You can't rely on your customers to tell you about crashes—many of them may not be technical enough, and most of them won't bother to take time off of their own important work to give you a useful crash report unless you make it completely automatic. - Joel Spolsky
  • 11. It’s 2012, don’t roll your own Use quincykit.net
  • 12. And everybody lived happily ever after...
  • 14. NSError *err = nil; [somethingWithErr:&err]; if (err) { UIAlertView *errorAlertView = [[UIAlertView alloc] initWithTitle:@”Error” message:[err description] delegate:nil cancelButtonTitle:OK otherButtonTitles:nil]; [errorAlertView show]; [errorAlertView release]; }
  • 15. NSError *err = nil; [somethingWithErr:&err]; if (err) { UIAlertView *errorAlertView = [[UIAlertView alloc] initWithTitle:@”Error” message:[err description] delegate:nil cancelButtonTitle:OK otherButtonTitles:nil]; [errorAlertView show]; [errorAlertView release]; }
  • 16. Or do I want one of these?
  • 17. So I wrote an error logger
  • 18. And everybody lived happily ever after...
  • 20. I started maintaining non-iOS code http://github.com/drewcrawford/buildbot
  • 21.
  • 22.
  • 23.
  • 24. I have too much noise
  • 25. But not enough signal
  • 26. But too much noise
  • 27.
  • 28. But not enough signal
  • 30.
  • 32. How do I make money? 1. Customer hears about me 2. ???? 3. Profit!
  • 33. How do I make money? 1. Customer hears about me 2. ???? What’s going on here? 3. Profit!
  • 35. Web Analytics • How many different times does a person visit my site before they convert?
  • 36. Web Analytics • How many different times does a person visit my site before they convert? • How do my blog readers’ habits change over time?
  • 37. Web Analytics • How many different times does a person visit my site before they convert? • How do my blog readers’ habits change over time? • What indicators (referrers, time-on-site, months of loyalty) correlate to high quality users?
  • 38. Web Analytics • How many different times does a person visit my site before they convert? • How do my blog readers’ habits change over time? • What indicators (referrers, time-on-site, months of loyalty) correlate to high quality users? • Can I prioritize sales leads automatically by their behavior on my site?
  • 40. App Analytics • Do websites, SEM ads, or product videos matter?
  • 41. App Analytics • Do websites, SEM ads, or product videos matter? • What causes people to make an IAP?
  • 42. App Analytics • Do websites, SEM ads, or product videos matter? • What causes people to make an IAP? • Should the button be here or there?
  • 43. App Analytics • Do websites, SEM ads, or product videos matter? • What causes people to make an IAP? • Should the button be here or there? • Is anyone really going to use this feature?
  • 44. App Analytics • Do websites, SEM ads, or product videos matter? • What causes people to make an IAP? • Should the button be here or there? • Is anyone really going to use this feature? • How many of my app users still use after 3 days?
  • 45. Nothing on this page answers any questions
  • 46. Anatomy of a useful page
  • 47. Anatomy of a useful page HOW???
  • 48.
  • 50. [FlurryAnalytics startSession:@"1R1NQX1SPPWD7SDPI9WZ"]; for(int i = 0; i < 5; i++) { [FlurryAnalytics logEvent:@"In for loop" withParameters:[NSDictionary dictionaryWithObject: [NSNumber numberWithInt:i] forKey:@"i"]]; }
  • 51. And then I waited several hours...
  • 52. And all I got was this lousy summary
  • 53. The world’s most worthless pie chart
  • 54. In fairness, you can export a few hundred records into Excel
  • 55. But if you want full logs You’d better ask nicely
  • 56. If only we had a machine that could process large quantities of data...
  • 57. These are views Not models. They draw pretty pictures. They’re not your data.
  • 58.
  • 59.
  • 60. It walks like raw data export It talks like raw data export But it’s not. Look for yourself: http://mixpanel.com/docs/api- documentation/data-export-api#libs-python
  • 61. We don't provide raw log exports at this time. It is something we are considering adding to our pipeline, so thanks for writing in with the feature request. - Mixpanel
  • 62. I’m not saying there’s a conspiracy to keep you from getting real event logs But don’t believe you can export your data until you actually download & check the damn logs
  • 64. The epic unit test • I’m working on a complicated “big-data” project • The unit tests parse 100ks of points and take hours • When your compile-build-run-test loop is measured in hours, you debug from an execution trace, not by stepping through code • One day the 200MB+ execution traces wouldn’t upload to our bug tracker any more
  • 65. The epic unit test • I was building custom tools to parse through the huge log files and give me the info I needed to debug after-the-fact • There’s a complicated system of macros controlling log levels of different components
  • 66. The epic unit test • Even with all these tools, rarely would I log the right things. • Logging the wrong things costs me hours to re- run the test. • Over and over again.
  • 67. Bion has a similar problem on a different project
  • 69. I read this article http://journal.paul.querna.org/articles/2011/12/26/log-for- machines-in-json/
  • 70. What if instead of this [Mon Dec 26 09:14:46 2011] [info] [client 50.57.61.4] File does not exist: /var/www/no-such-file
  • 71. We log this {     "timestamp": 1324830675.076,     "status": "404",     "short_message": "File does not exist: /var/www/no-such-file",     "host": "ord1.product.api0",     "facility": "httpd",     "errno": "ENOENT",     "remote_host": "50.57.61.4",     "remote_port": "40100",     "path": "/var/www/no-such-file",     "uri": "/no-such-file",     "level": 4,     "headers": {         "user-agent": "BadAgent/1.0",         "connection": "close",         "accept": "*/*"     },     "method": "GET",     "unique_id": ".rh-g2Tm.h-ord1.product.api0.r-axAIO3bO.c-9210.ts-1324830675.v-24e946e" }
  • 72. And instead of logging to this
  • 73. We log to this
  • 74. Then I can query • By any element in the JSON dictionary • Across multiple tiers (client, server, web) • Across platforms • I can assign a unique ID to an iOS event and follow the API request across my whole stack
  • 75. If it serves up all FB’s content Pretty sure it can handle a few million print statements
  • 76. Have you figured out the common problem? we’re talking about EVENTS
  • 77. printf / NSLog • e-mail received • server logs • sales inquiry • webapp logs • bug resolved • page view • User taps button • error • unit test run • download notification • patch committed
  • 78. Why do we need 10 systems to solve one problem?
  • 79. Only four kinds of events • Things logged only to stderr / console • Things logged to a unified network log file • Things somebody is notified about • Things somebody gets woken up about
  • 80. So about that server...
  • 81. I’ve been playing with loggly • So far, so good • I downloaded the damn logs • Events queryable in ~5s for me • High-perf log import (raw sock available) • Filter and query on a hadoop cluster console, a few gotchas but pretty neat • I’m routlinely pushing up 100k events per day and I’m a tiny user
  • 82. Searching by bug # across platforms
  • 83. Do you really expect me to build that dict? I just want to type NSLog(@”Something”);
  • 84. The hardest part of this whole mess is figuring out what to log and actually logging it
  • 85. Remember this? An event that happened three months ago can be the most important thing to understand the events of today.
  • 86. We can add state to our log statement • dict.username = “Frank” • log(“something”) //username=Frank • log(“something”) //username=Frank To reduce the work
  • 87. But we have to remember to undo it • dict.username = “bill” • begin_session(bill) • log(“something”) • begin_session(james) • log(“something else”) //oops!
  • 88. Kind of like memory management • Balance malloc with free • Balance retain with release • Balance new with delete
  • 89. But some memory is auto-managed int i = 0; { int j = 0; //can access j and i } //can access only i
  • 90. Can we use a similar trick to build our logging dictionary?
  • 91. JUCHE • printf / NSLog • e-mail received • server logs • sales inquiry • webapp logs • bug resolved • page view • User taps button • error • unit test run • download • patch committed notification One library to rule them all
  • 92.
  • 94. • iOS, Python • Builds the dict with ease
  • 95. • iOS, Python • Builds the dict with ease • Logs to stderr, loggly
  • 97. Events are nested • Today
  • 98. Events are nested • Today • Got up
  • 99. Events are nested • Today • Got up • Made coffee
  • 100. Events are nested • Today • Got up • Made coffee • Closed bugs
  • 101. Events are nested • Today • Got up • Made coffee • Closed bugs • Bug 1
  • 102. Events are nested • Today • Got up • Made coffee • Closed bugs • Bug 1 • Bug 2
  • 103. Events are nested • Today • Got up • Made coffee • Closed bugs • Bug 1 • Bug 2 • Had lunch
  • 104. Events are scoped • Today • Got up • Made coffee • Closed bugs • Bug 1 • Bug 2 • Had lunch Inner items inherit the settings of outer items
  • 105. for(int i = 0; i < 3; i++) { [JucheLog revolt:@"i",[NSString stringWithFormat:@"%d",i],^{ JUCHE(JINFO,@"My awesome loop"); }]; }
  • 106. for(int i = 0; i < 3; i++) { [JucheLog revolt:@"i",[NSString stringWithFormat:@"%d",i],^{ JUCHE(JINFO,@"My awesome loop"); }]; } | [INFO] 19:12:11 My awesome loop i=0 juchelog.py:142 | [INFO] 19:12:11 My awesome loop i=1 juchelog.py:142 | [INFO] 19:12:11 My awesome loop i=2 juchelog.py:142
  • 107. for i in range(0,3): with juche.revolution(i=i,eternal_president="kim-il-sun"): juche.info("Outer loop!") for j in range(0,2): with juche.revolution(j=j): juche.info("Inner loop!") | [INFO] 19:12:11 Outer loop! i=0 eternal_president=kim-il-sun juchelog.py:147 | | [INFO] 19:12:11 Inner loop! j=0 juchelog.py:150 | | [INFO] 19:12:11 Inner loop! j=1 juchelog.py:150 | [INFO] 19:12:11 Outer loop! i=1 eternal_president=kim-il-sun juchelog.py:147 | | [INFO] 19:12:11 Inner loop! j=0 juchelog.py:150 | | [INFO] 19:12:11 Inner loop! j=1 juchelog.py:150 | [INFO] 19:12:11 Outer loop! i=2 eternal_president=kim-il-sun juchelog.py:147 | | [INFO] 19:12:11 Inner loop! j=0 juchelog.py:150 | | [INFO] 19:12:11 Inner loop! j=1 juchelog.py:150
  • 108. | [INFO] 19:12:11 Outer loop! i=0 eternal_president=kim-il-sun juchelog.py:147 | | [INFO] 19:12:11 Inner loop! j=0 juchelog.py:150 | | [INFO] 19:12:11 Inner loop! j=1 juchelog.py:150 | [INFO] 19:12:11 Outer loop! i=1 eternal_president=kim-il-sun juchelog.py:147 | | [INFO] 19:12:11 Inner loop! j=0 juchelog.py:150 | | [INFO] 19:12:11 Inner loop! j=1 juchelog.py:150 | [INFO] 19:12:11 Outer loop! i=2 eternal_president=kim-il-sun juchelog.py:147 | | [INFO] 19:12:11 Inner loop! j=0 juchelog.py:150 | | [INFO] 19:12:11 Inner loop! j=1 juchelog.py:150 {"function": "__block_global_0", "who": "G88014V4XYK", "indent": "2", "thread": "main", "eternal_president": "kim-il-sun", "i": "2", "app": "com.dca.JucheLogTestMac", "j": "2", "version": "1", "file": "JucheLogTests.m", "msg": "Inner loop!", "line": "44", "level": "info"}
  • 110. Call for contributors Use the library http://github.com/drewcrawford/JucheLog
  • 111. Call for contributors Use the library See if it solves your problems http://github.com/drewcrawford/JucheLog
  • 112. Call for contributors Use the library See if it solves your problems Critique the syntax http://github.com/drewcrawford/JucheLog
  • 113. Call for contributors Use the library See if it solves your problems Critique the syntax Critique the terminal output http://github.com/drewcrawford/JucheLog
  • 114. Call for contributors Use the library See if it solves your problems Critique the syntax Critique the terminal output Port it to (PHP, RoR, JS...) http://github.com/drewcrawford/JucheLog
  • 115. Call for contributors Use the library See if it solves your problems Critique the syntax Critique the terminal output Port it to (PHP, RoR, JS...) Write convenience functions http://github.com/drewcrawford/JucheLog
  • 116. Call for contributors Use the library See if it solves your problems Critique the syntax Critique the terminal output Port it to (PHP, RoR, JS...) Write convenience functions “Log every Y times” http://github.com/drewcrawford/JucheLog
  • 117. Call for contributors Use the library See if it solves your problems Critique the syntax Critique the terminal output Port it to (PHP, RoR, JS...) Write convenience functions “Log every Y times” Log+UIAlertView http://github.com/drewcrawford/JucheLog
  • 118. Call for contributors Use the library See if it solves your problems Critique the syntax Critique the terminal output Port it to (PHP, RoR, JS...) Write convenience functions “Log every Y times” Log+UIAlertView Log more types (NSError) http://github.com/drewcrawford/JucheLog
  • 119. Call for contributors Use the library See if it solves your problems Critique the syntax Critique the terminal output Port it to (PHP, RoR, JS...) Write convenience functions “Log every Y times” Log+UIAlertView Log more types (NSError) streamlined opt-out http://github.com/drewcrawford/JucheLog
  • 120. So how evil is this?
  • 121. I am not a lawyer And this is not legal advice
  • 122. 17.1 Apps cannot transmit data about a user without obtaining the user's prior permission and providing the user with access to information about how and where the data will be used
  • 123. Your EULA says Consent to Use of Data:You agree that Application Provider may collect and use technical data and related information, including but not limited to technical information about Your device, system and application software, and peripherals, that is gathered periodically to facilitate the provision of software updates, product support and other services to You (if any) related to the Licensed Application. Application Provider may use this information, as long as it is in a form that does not personally identify You, to improve its products or to provide services or technologies to You.
  • 126. I use data • To diagnose and fix bugs and crashes
  • 127. I use data • To diagnose and fix bugs and crashes • To learn where users are getting stuck
  • 128. I use data • To diagnose and fix bugs and crashes • To learn where users are getting stuck • To learn what percentage of my customer base experiences issues
  • 129. I use data • To diagnose and fix bugs and crashes • To learn where users are getting stuck • To learn what percentage of my customer base experiences issues • To plan new features and updates
  • 130. I use data • To diagnose and fix bugs and crashes • To learn where users are getting stuck • To learn what percentage of my customer base experiences issues • To plan new features and updates • To A/B test and see what people like
  • 131. I use data • To diagnose and fix bugs and crashes • To learn where users are getting stuck • To learn what percentage of my customer base experiences issues • To plan new features and updates • To A/B test and see what people like • To understand my customers’ needs
  • 132. I use data • To diagnose and fix bugs and crashes • To learn where users are getting stuck • To learn what percentage of my customer base experiences issues • To plan new features and updates • To A/B test and see what people like • To understand my customers’ needs • Always for the benefit of the users
  • 133. Not to sell to someone else
  • 134. (Don’t even log personal data)
  • 135. So
  • 136. Get a good signal
  • 137. Turn down the noise
  • 139. Look for common problems and build common solutions
  • 140. Tiny iOS Developer • Mix of contracts & products • Many other dev tools like JucheLog

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n
  122. \n
  123. \n
  124. \n
  125. \n
  126. \n
  127. \n
  128. \n
  129. \n
  130. \n
  131. \n
  132. \n
  133. \n