TIPS & TRICKS

SPLogger: iPhone Logging API

This week I put up on GitHub an early version of a Splunk logging API for iPhone developers, call SPLogger.  We’d love feedback, code contributions, suggestion.  The SPLogger API allows iPhone developers to log events in their application and have them go to Splunk Storm (www.splunkstorm.com), which is free for up to a GB of data. If you currently have no insight into how your app is being used, or by whom, this can come in handy, and of course you’ll have the full power of SPL, Splunk’s search language.

To get the SPLogger API, download it via either method:

Using Storm for Analytics

By using SPLogger, all events from all mobile devices are uploaded to splunkstorm.com, where you can do amazing analytics on your apps and users.  Here is just a taste.

Show the top 10 users of my apps:

 sourcetype=splogger | top 10 host

Show the top 5 hardware types:

 sourcetype=splogger | top 5 sys_machine, sys_model

Of the users on level 5 of my game, what is the rate of success or failure (assumes I logged with properties called ‘level’ and ‘success’):

 sourcetype=splogger level=5 | stats count by success:

Show a chart of usage by time, broken up by each of my apps:

 sourcetype=splogger | timechart count by source

How long do users typical use my apps, assuming a 5 minute pause means the user is done:

 sourcetype=splogger | transaction host maxpause=5m | stats min(duration), max(duration), avg(duration)

----------------------------------------------------
Thanks!
David Carasso

Splunk
Posted by

Splunk

TAGS

SPLogger: iPhone Logging API

Show All Tags
Show Less Tags

Join the Discussion