Top Banner
Copyright © 2016 Splunk Inc. Bill Emmett Director, Solutions Marketing, Splunk Jon Vlachogiannis Director, Engineering, Splunk Splunking Your Mobile Apps
21

SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

May 22, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

Copyright©2016Splunk Inc.

BillEmmettDirector,SolutionsMarketing,Splunk

JonVlachogiannisDirector,Engineering,Splunk

Splunking YourMobileApps

Page 2: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

Disclaimer

2

Duringthecourseofthispresentation,wemaymakeforwardlookingstatementsregardingfutureeventsortheexpectedperformanceofthecompany.Wecautionyouthatsuchstatementsreflectourcurrentexpectationsandestimatesbasedonfactorscurrentlyknowntousandthatactualeventsorresultscoulddiffermaterially.Forimportantfactorsthatmaycauseactualresultstodifferfromthose

containedinourforward-lookingstatements,pleasereviewourfilingswiththeSEC.Theforward-lookingstatementsmadeinthethispresentationarebeingmadeasofthetimeanddateofitslivepresentation.Ifreviewedafteritslivepresentation,thispresentationmaynotcontaincurrentoraccurateinformation.Wedonotassumeanyobligationtoupdateanyforwardlookingstatementswemaymake.Inaddition,anyinformationaboutourroadmapoutlinesourgeneralproductdirectionandissubjecttochangeatanytimewithoutnotice.Itisforinformationalpurposesonlyandshallnot,beincorporatedintoanycontractorothercommitment.Splunkundertakesnoobligationeithertodevelopthefeaturesor

functionalitydescribedortoincludeanysuchfeatureorfunctionalityinafuturerelease.

Page 3: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

Agenda

TheChallengesofMonitoringMobileAppsIntroducingSplunkforMobileIntelligence(SplunkMINT)DeployingSplunkMINT– IntrotoSDKs– GettingStarted

UsingSplunkMINT– Trackingapplicationquality&anduserengagement– “MixandMatch”otherdatasources

3

Page 4: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

• NewOSversionsbreakapps

• Networkissuesaredifficulttofindandsimulate

• Limitedtimetomakechangesandfixes

TheChallengesofDeliveringMobileApps

4

• Planforgrowth

• Solveinfrastructure,APIandappissues

• Featureusage

• Monitor/analyzeuserbehavior

• Deliveromni-channelanalytics

• Mobile+web+desktop

FormFactor,Platform,InteractionStyle

Variety

RapidAppDev Cycles,Break-FixNeeds

Infrastructure Analytics

• OSanddevice-centricdevelopment

• Needtocorrelatedevices,versions

Page 5: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

DifferentChallengesforDifferentRoles

5

• HowdoIfindtherootcauseofappcrashes/poorperformance?• Whatwereusersdoingwhentheissuehappened?• HowdoIgetmoreinsightintotransactionpaths?

• Istheproblemwiththeapp,thenetworkorthebackendsystem?• DoIhavetherightcapacityinplacetohandletransactionvolume?• Howdoesperformancecomparemobilevs.webvs.desktop?

• Howarecustomersusingmyapp?• WhichfeaturesshouldIprioritizeforfutureversions?• Howdoescustomerbehaviorcompareacrosschannels?

MOBILEAPPDEVELOPERS

PRODUCTMANAGERS/BUSINESSOWNERS

APPMANAGERS/OPERATIONS

Page 6: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

SplunkforMobileIntelligence

DeliverBetterPerforming,MoreReliableApps

DeliverReal-TimeAnalytics

AchieveEnd-to-EndVisibility

Page 7: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

SplunkMINTArchitecture

7

InstrumentappswithSplunkMINTSDKs

DatacanbedeliveredeitherviaSplunkMINTDataCollectorORHTTPEventCollector(HEC)

SplunkMINTappgivesyouaheadstartondashboardsanddatamodelformobiledata

Page 8: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

WhatisnewinMINT?

Page 9: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

iOSSDKNewFeatures

9

// Objective C - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[Mint sharedInstance] initAndStartSessionWithHECUrl: url:@"HEC_URL" token:@"HEC_TOKEN"]; // ... return true;

}

HTTPEventCollectorSupport– FullOnPrem MINT!

BewarethoughthattheMINTSDKsshouldsenddatatoendpoint/services/collector/mint

Page 10: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

iOSSDKNewFeatures

10

CustomTimers

Totrackinternalprocessesinyourmobileapp,youcancreateahigh-precisiontimerthatrunsonceandrecordstheelapsedtime,innanoseconds.Usethefollowingmethodstoworkwithtimers:

Tostartatimer,usethe startTimerWithName:method.Tostopatimer,usethe stopTimerWithId:method.

index=minttimerName=Timer1|statsavg(elapsedTime)byosVersion

IsthisfeaturefasteronthenewiOS?

Page 11: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

iOSSDKNewFeatures

11

ViewMemoryWarnings

Whenamobileappreceivesmemorywarnings,theMINTSDKforiOSreportsmemoryinformationfortheViewController classthatreceivedthewarningusingthefollowingfields:• totalMemory• usedMemory• wiredMemory• activeMemory• inactiveMemory• freeMemory• purgableMemory

index=mintsourcetype="mint:memorywarning”|statscountbyappVersionName

DoIstillgetmemorywarningsinmynewrelease?

Page 12: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

iOSSDKNewFeatures

12

TraceObjectiveCMethods

IfyouareusingObjective-C,youcanlogtraceinformationonspecificmethodsinyourcodetomeasureperformanceusingthefollowingmacros:

MINT_METHOD_TRACE_START:Startsthemethodtrace.

MINT_METHOD_TRACE_STOP:Stopsthemethodtrace.MINT_NONARC_METHOD_TRACE_STOP:Stopsthemethodtrace.UsethismacroifyouarenotusingARC.

index=mintsourcetype="mint:methodinvocation”|statsavg(elapsedTime)bymethod

Whataretheslowestmethodsinmyapp?

Page 13: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

AndroidSDKNewFeatures

13

HTTPEventCollector– FullonPrem MINT!Mint.initAndStartSessionHEC(MyActivity.this,"HEC_MINT_endpoint_URL","YOUR_HEC_TOKEN");

index=mint

Showmemobiledata

BewarethoughthattheMINTSDKsshouldsenddatatoendpoint/services/collector/mint

Page 14: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

applyplugin:'com.android.application'applyplugin:'com.splunk.mint.gradle.android.plugin'…buildscript {repositories{maven{url uri('mint-plugin-repo-5.1.0')

}//Willneedtoaddjcenter repoORmavenCentraljcenter()mavenCentral()...}dependencies{classpath 'com.splunk:mint-gradle-android-plugin:5.1.0'}

}

AndroidSDKNewFeatures

14

NewInstrumentation:CaptureallHTTPcalls

index=mintsourcetype=network

ShowmeALLnetworkdata

Bonus- OKHTTPsupport- HTTPMethods- Annotationarecoming!

Page 15: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

AndroidSDKNewFeatures

15

CustomTimers

Stringtimer_id =Mint.timerStart("Timer1");

Mint.timerStop(timer_id);

index=minttimerName=Timer1|avg(elapsedTime)bybatteryLevel bins=10

IsthatcodeblockfasterwhenbatteryLevel higher?

Page 16: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

AndroidSDKNewFeatures

16

TrackANRs– Ohyes!

Mint.startANRMonitoring(5000,true);

index=mintsourcetype=mint:error extraData.ANR=true|statscountbycurrentView

Inwhatscreendoesmyappstuck?

Androiddevicesdisplayan ApplicationNotResponding dialogbox,or ANR,whenanapplicationcannotrespondtouserinput.YoucanviewareportofANRswhentheyoccurinyourmobileapp.EnableANRreportingusingthefollowing startANRMonitoring(timeout, ignoreDebugger)method.Forexample:

Page 17: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

IntroducingtheITSIEUMModuleSeeMINTdataincorrelationwithotherITdata

17

Page 18: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

SeeMobile&Datacentertogether

18

Getthebigpictureusingonetool

Page 19: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

StepsforGettingSplunkMINT

GettheSDKs– AndroidoriOS– Availableathttp://dev.splunk.com

Registerathttp://mint.splunk.comGetanAPIkey(oneforeachapp)http://mint.splunk.comGettheSplunkMINTappfromSplunkbaseUsethebundledEUMmoduleforSplunkITSI

19

Page 20: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

SomeBestPracticestoRemember

MobileApps– getinsightnotonlyfromyour“backend”,butalsofromtheperspectiveoftheappEngagement– don’tjustfocusonperformancedata,lookatusagetrendsinyourmobileappTransactions– whatarethemostimportanttransactionscomingfromyourmobileapp?Correlations– usecorrelationstotietransactionstogether

20

Page 21: SplunkingYour Mobile Apps - .conf19 | Splunk · Introducing Splunk for Mobile Intelligence (Splunk MINT) Deploying Splunk MINT – Intro to SDKs – Getting Started Using Splunk MINT

THANKYOU