Mobile Application Monitoring - Free Edition iOS ADK...

42
Mobile Application Monitoring - Free Edition iOS ADK User Guide November 2013

Transcript of Mobile Application Monitoring - Free Edition iOS ADK...

Page 1: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Mobile Application Monitoring - Free EditioniOS ADK User Guide

November 2013

Page 2: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Please direct questions about dynaTrace or comments on this document to:

APM Customer SupportFrontLine Support Login Page:

http://go.compuware.com

Copyright © 2013 Compuware Corporation. All rights reserved. Unpublished rights reserved under the Copyright Laws of theUnited States.

U.S. GOVERNMENT RIGHTS-Use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth inCompuware Corporation license agreement and as provided in DFARS 227.7202-1(a) and 227.7202-3(a) (1995), DFARS252.227-7013(c)(1)(ii) (OCT 1988), FAR 12.212(a) (1995), FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable.Compuware Corporation.

This product contains confidential information and trade secrets of Compuware Corporation. Disclosure is prohibited withoutthe prior express written permission of Compuware Corporation. Use of this product is subject to the terms and conditions of theuser's License Agreement with Compuware Corporation.

Documentation may only be reproduced by Licensee for internal use. The content of this document may not be altered, modifiedor changed without the express written consent of Compuware Corporation. Compuware Corporation may change the contentspecified herein at any time, with or without notice. All current Compuware Corporation product documentation can be found athttp://go.compuware.com.

Compuware, Compuware APM, dynaTrace, and other names and logos identifying Compuware products are trademarks orregistered trademarks of Compuware Corporation.

Adobe® Reader® is a registered trademark of Adobe Systems Incorporated in the United States and/or other countries.

All other company and product names are trademarks or registered trademarks of their respective owners.

Local Build: November 5, 2013, 13:38

Page 3: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Contents

5Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5Documentation Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7Chapter 1 ∙ Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7Supported Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9Chapter 2 ∙ Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9Overview of the Instrumentation Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9Adding the iOS ADK to the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10Basic Instrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13Chapter 3 ∙ Instrumentation Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13Methods for Instrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13CompuwareUEM Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13setMonitorCookie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14startupWithApplicationName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15enableCrashReportingWithReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18setGpsLocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18lastErrorCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18lastErrorMsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18flushEvents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19UEMAction Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19enterActionWithName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19leaveAction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20reportEventWithName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20reportValueWithName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21reportErrorWithName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22getRequestTagHeader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22getRequestTagValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22Lifecycle Instrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3Mobile Application Monitoring - Free Edition iOS ADK User Guide

Contents

Page 4: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

23Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25Chapter 4 ∙ Collected Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29Chapter 5 ∙ Viewing Application Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30Mobile Application Performance Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31Summary Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31Performance Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32Availability Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34Drilling Down to Crash Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37Analytics Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38Event Tracking Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40Profile Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Mobile Application Monitoring - Free Edition iOS ADK User Guide4

Contents

Page 5: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

I N T R O D U C T I O N

This guide provides information and instructions for using the Mobile Application Monitoring- Free Edition iOS ADK to instrument your iOS applications to collect performance data directlyfrom your application running on mobile devices.

Documentation ConventionsThe following font conventions are used throughout documentation:

IndicatesThis font

Terms, commands, and references to names of screen controls and userinterface elements.

Bold

Emphasized text, inline citations, titles of external books or articles.Citation

Links to Internet resources and linked references to titles in Compuwaredocumentation.

DocumentationConventions [p. 5]

Cited contents of text files, inline examples of code, command line inputs orsystem outputs. Also file and path names.

Fixed width

User input in console commands.Fixed width bold

Place holders for values of strings, for example as in the command:Fixed width italic

cd directory_name

Menu items.Menu ➤ Item

Text screen shots.Screen

Blocks of code or fragments of text files.Code block

Getting HelpWhen you are logged in to the Mobile Application Performance page, use the links on theleft side to display support resources.

5Mobile Application Monitoring - Free Edition iOS ADK User Guide

Page 6: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Getting StartedThe Getting Started page provides basic instructions for downloading and instrumentingthe ADK.

Support CenterThe Support Center page contains links to display the iOS and Android versions of theuser guide; go to the Compuware YouTube channel to view tutorial videos; access theCompuware APM Community forum for Mobile Application Monitoring - Free Edition;or send email to request additional information or help.If no data is displayed for an instrumented application, refer to the troubleshootingsuggestions displayed on this page.

Mobile App CommunityUse this link to go directly to the Mobile Application Monitoring - Free Edition forum inthe Compuware APM Community. The forum includes an Open Q&A section where youcan post questions or share information with other users.

To log in, go to http://labs.gomeznetworks.com. If you have forgotten your username or password,click the Forgot your username or password? link to retrieve the information.If you have questions not addressed by the available support resources, send email [email protected].

Mobile Application Monitoring - Free Edition iOS ADK User Guide6

Introduction

Page 7: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

C H A P T E R 1

Overview

Mobile Application Monitoring - Free Edition is a SaaS solution that monitors mobileperformance from the real user perspective. It provides performance statistics, crash reporting,and business analytics for native mobile applications. You can track the numbers of users andapplication sessions across geographical locations, devices, and networks; review performanceby device; analyze the impact of device characteristics such as signal strength, battery charge,and memory; and investigate the causes of crashes and errors.You can upgrade seamlessly from the Free Edition to the Professional Edition. For a comparisonof the features in the Free Edition vs. the Professional Edition, log in to the Mobile ApplicationPerformance web site at http://labs.gomeznetworks.com, and select the Upgrade link.

Supported PlatformsThe iOS ADK is supported for iOS version 5.0 and later (ARMv7, ARMv7s, or newerarchitecture).

Best Practices

Privacy Policies for Capturing Mobile End User Data

Mobile applications are governed under the respected terms and conditions of such applications,which may include providing end-users with explicit information about the data that is collectedand reported from the applications that are running on the end user's mobile device. You andyour organization are responsible for complying with all such terms and conditions, as well asany or all applicable laws concerning data collection and end-user privacy that may requirenotices, consent, or opt-in screens.The iOS ADK capabilities include the collection of information such as connection type, availablememory, application execution time, and battery strength. All data is collected anonymouslyand is only used in aggregate form. Such data is only collected to improve the quality of themobile application and Compuware shall only use aggregated data to determine the effectivenessof the mobile application.

7Mobile Application Monitoring - Free Edition iOS ADK User Guide

Page 8: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Verifying Your Server URL

Before instrumenting your application, obtain your account ID and server URL string from theportal. Your Server URL maps the data collected from your mobile application to your account.If an incorrect server URL is used, your data will not be available in the Mobile ApplicationPerformance page.

Naming the Application Events

Name your application events so they are easy to identify in the reporting portal.

• The application event name can be up to 240 characters.

• In the Mobile Application Performance page, special characters and blanks in yourapplication name and event names will be replaced by underscores.

Mobile Application Monitoring - Free Edition iOS ADK User Guide8

Chapter 1 ∙ Overview

Page 9: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

C H A P T E R 2

Getting Started

This chapter is intended to help mobile application developers get up and running as quicklyas possible with the iOS ADK.It is assumed that you already have experience developing, building, and deploying iOSapplications and are familiar with the XCode IDE and with iOS. For more information, visithttps://developer.apple.com/xcode/.

Overview of the Instrumentation ProcessInstrumenting your mobile application involves the following tasks:

1. Download the iOS ADK.2. Include the iOS ADK library in your iOS build environment.3. Instrument and test the mobile application.

Adding the iOS ADK to the Project1. Unpack the following files from the ADK download to any directory, then add the files to

your Xcode project and to the iOS targets you want to instrument.

• libCompuwareUEM.a – The static library file.

• CompuwareUEM.h – The header file.

• CPWRLog.h – Optional. Include this file if you want to be able to turn on logging tosee error messages and trace statements.

2. Add the required frameworks and libraries to your Xcode project.In the Project Navigator:a. Select your project, then select your target.b. Select the Build Phases tab.c. Expand Link Binaries With Libraries.d. Click the + button and select the following frameworks and libraries:

• libsqlite3.0.dylib

9Mobile Application Monitoring - Free Edition iOS ADK User Guide

Page 10: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

• CoreLocation.framework

• CoreTelephony.framework

• Security.framework

• SystemConfiguration.framework

• libz.dylib

• libc++.dylib

• MessageUI.framework

3. Add the -ObjC flag to Other Linker Flags.a. Select your project, then select your target.b. Select Build Settings.c. Add the -ObjC option to the Other Linker Flags setting.

4. Set the build setting Strip Style to Debugging Symbols.This increases the size of your binary slightly, but leaves intact the information needed foron-device crash symbolication.

5. Add the documentation to Xcode.Copy the file com.compuware.uem.iOS.CompuwareUEM.docset to the directory~/Library/Developer/Shared/Documentation/DocSets.

Basic InstrumentationComplete the following steps to add monitoring capability to your mobile app.After you complete the basic instrumentation procedure, you can fine-tune the data collectionby adding events and by configuring your application to monitor lifecycle events. For moreinformation, see Instrumentation Details [p. 13].

1. Add the following at the top of every .m file that will be instrumented.#import "CompuwareUEM.h";

2. Send the startup message to the CompuwareUEM object, either in the main() function, inthe didFinishLaunchingWithOptions method of the application delegate class, or inthe viewDidLoad method of the first view controller.[CompuwareUEM startupWithApplicationName:@"MyAppName"

serverURL:@"http://abcdef.m.axf8.net"

allowAnyCert:NO

certificatePath:nil];

Where http://abcdef.m.axf8.net is the URL for your account (abcdef represents youraccount ID). This information is provided in your registration email and in the support pagewhen you are logged in to the Mobile Application Performance page.

3. Override at least one view controller with the appropriate CompuwareUEM view controllerclass.It is recommended to override the first view displayed.For more information, see Lifecycle Instrumentation [p. 22].

Mobile Application Monitoring - Free Edition iOS ADK User Guide10

Chapter 2 ∙ Getting Started

Page 11: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

4. Make a call to enableCrashReportingWithReport after the startup API is called.For more information, see CompuwareUEM Methods [p. 13].

11Mobile Application Monitoring - Free Edition iOS ADK User Guide

Chapter 2 ∙ Getting Started

Page 12: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Mobile Application Monitoring - Free Edition iOS ADK User Guide12

Chapter 2 ∙ Getting Started

Page 13: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

C H A P T E R 3

Instrumentation Details

Methods for InstrumentationTwo classes are defined in CompuwareUEM.h that are used to instrument your iOS app. TheCompuwareUEM class is used to manage the ADK operations. The UEMAction class is used tocreate actions and report against them.Some methods include functionality that is only available in the Professional Edition, as notedbelow. When you include these methods in the instrumentation for the Free Edition, thefunctionality is automatically available upon upgrading to the Professional Edition.

ADK Threading and Blocking

All of the ADK method calls are non-blocking. The process that reports the data back to theCompuware APM servers runs in a separate thread and is also non-blocking.

CompuwareUEM Methods

setMonitorCookieUse this method to set the value of the HTTP cookie header to be sent along with every HTTPGET/POST request made by the iOS ADK when establishing contact with the back end or sendingdata to it.This method is only necessary if the cookie is required by your network infrastructure. Themethod must be invoked beforestartupWithApplicationName:serverURL:allowAnyCert:certificatePath: to ensurethat the earliest requests include the cookie. It can be invoked again to change the cookie stringat any time.

Syntax+ (void) setMonitorCookie:(NSString *)cookieString

Parameter• cookieString – A string containing a valid cookie. It must at a minimum contain

the cookie name, followed by a colon, and at least one name value pair, where

13Mobile Application Monitoring - Free Edition iOS ADK User Guide

Page 14: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

additional name value pairs are separated by a semi-colon. For example: @"Cookie:name=value; name2=value2". Pass nil to remove the cookie header from requests.

startupWithApplicationNameCall this method to initialize the ADK.The method must be invoked before any other methods are called for which you want to capturemetrics. Multiple calls to this method will be ignored if the ADK is not shut down. A certificatein DER format, which is used as additional anchor to validate HTTPS communication, is neededif allowAnyCert is NO and a self-signed certificate is used. For example:NSString *pathToCertificateAsDER = [[NSBundle mainBundle]

pathForResource:@"easyTravelServerCert" ofType:@"der"];

Syntax+ (CPWR_StatusCode) startupWithApplicationName:(NSString *)applicationName

serverURL:(NSString *)serverURL

allowAnyCert:(BOOL)allowAnyCert

certificatePath:(NSString *)pathToCertificateAsDER

Parameters• applicationName – A user-defined application identifier (for example,

@"EasyTravel").

• serverURL – The serverURL contains your account ID and the URL for MobileApplication Monitoring - Free Edition. Refer to your Account Activation email oryour support web page. An example of the URL is:http://0B6B48.m.axf8.net

Where 0B6B48 is the account ID.

• allowAnyCert – Allow any certificate for HTTPS communication. This parameterwill only be evaluated if you specified the HTTPS transport mechanism in the servername.

• certificatePath – Path to a (self-signed) certificate in DER format; or nil.

Return Values• CPWR_UemOn – The ADK was successfully started.

• CPWR_Error_InvalidParameter – The applicationName or serverURL parameteris nil or an empty string.

• CPWR_TruncatedEventName – The applicationName is longer than 255 characters.

• CPWR_Error_NotInitialized – Could not initialize database.

• CPWR_UemOff – Shutdown in progress, retry startup after it completes.

shutdownCall this method to shut down the ADK.Collected data will be flushed to the reporting portal. This function does not return until theattempt to send data either succeeds or fails. You should not call this method on the main threadbecause it will make your UI unresponsive. If the attempt fails, the data is retained. It will besent later if the ADK is restarted before the 9-minute purge timeout.

Mobile Application Monitoring - Free Edition iOS ADK User Guide14

Chapter 3 ∙ Instrumentation Details

Page 15: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Syntax+ (CPWR_StatusCode) shutdown

Return Value• CPWR_UemOff – Shutdown was successful.

enableCrashReportingWithReportThe enableCrashReportingWithReport methods activate the KSCrash framework withinthe iOS ADK to capture signals and unhandled exceptions. When a crash occurs, a report issaved on the device. The next time the app is started, the report is processed.

NOTECrash reporting must be enabled to collect accurate availability data.

The sendCrashReport parameter should be set to FALSE for the Free Edition. A value ofTRUE is only meaningful for the Professional Edition (in which case the complete iOS crashreport is sent to the dynaTrace server).When sendCrashReport is set to FALSE, a crash event containing some information aboutthe crashed thread is sent to the servers. If the same exception reoccurs within seven days, thecrash data is not reported again, but a crash event is reported referencing the previously reportedcrash data.The KSCrash framework supports sending crash information to several types of backend systems.If you are already using one of these systems, then you can continue to use it in addition to theCompuware APM server by using the appropriate enable method. Only one of these methodsmay be called during each invocation of an application.

Return ValuesFor all implementations, the return values are as follows:

• CPWR_CrashReportingAvailable – Crash reporting is enabled.

• CPWR_CrashReportingUnavailable – Crash reporting could not be enabled.

• CPWR_UemOff – The ADK is not initialized, or is not collecting data.

Compuware APM Only

This method sends crash data to the Compuware APM server, as described above.

Syntax+ (CPWR_StatusCode) enableCrashReportingWithReport:(BOOL)sendCrashReport

Parameter• sendCrashReport – TRUE to send a complete crash report (Professional Edition

only), FALSE to send only a crash event without full details.

HockeyApp

This method sends crash data to the Compuware APM server and HockeyApp.

15Mobile Application Monitoring - Free Edition iOS ADK User Guide

Chapter 3 ∙ Instrumentation Details

Page 16: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Syntax+ (CPWR_StatusCode) enableCrashReportingWithReport:(BOOL)sendCrashReport

hockeyAppIdentifier:(NSString *)appIdentifier

hockeyWaitUntilReachable:(BOOL)waitUntilReachable

hockeyUserId:(NSString *)userId

hockeyContactEmail:(NSString *)contactEmail

hockeyCrashDescription:(NSString *)description

Parameters• sendCrashReport – TRUE to send a complete crash report (Professional Edition

only), FALSE to send only a crash event without full details.

• appIdentifier – The identifier assigned by HockeyApp to your application.

• waitUntilReachable – YES to wait until HockeyApp is reachable before sending.NO to attempt sending whether available or not; sending fails if HockeyApp is notavailable.

• userId – Optional HockeyApp user ID. Set to nil if not needed.

• contactEmail – Optional HockeyApp user contact email address. Set to nil if notneeded.

• description – Optional description to include with the crash report for HockeyApp.

Quincy Server

This method sends crash data to the Compuware APM server and a Quincy server.

Syntax+ (CPWR_StatusCode) enableCrashReportingWithReport:(BOOL)sendCrashReport

quincyURL:(NSString *)serverURL

quincyWaitUntilReachable:(BOOL)waitUntilReachable

quincyUserId:(NSString *)userId

quincyContactEmail:(NSString *)contactEmail

quincyCrashDescription:(NSString *)description

Parameters• sendCrashReport – TRUE to send a complete crash report (Professional Edition

only), FALSE to send only a crash event without full details.

• serverURL – The URL for the Quincy server.

• waitUntilReachable – YES to wait until the Quincy server is reachable beforesending. NO to attempt sending whether available or not; sending fails if Quincy isnot available.

• userId – Optional Quincy user ID. Set to nil if not needed.

• contactEmail – Optional Quincy user contact email address. Set to nil if not needed.

• description – Optional description to include with the crash report for Quincy.

Victory Server

This method sends crash data to the Compuware APM server and a Victory server.

Syntax+ (CPWR_StatusCode) enableCrashReportingWithReport:(BOOL)sendCrashReport

victoryURL:(NSString *)serverURL

victoryUserName:(NSString *)userName

victoryUserEmail:(NSString *)userEmail

Mobile Application Monitoring - Free Edition iOS ADK User Guide16

Chapter 3 ∙ Instrumentation Details

Page 17: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Parameters• sendCrashReport – TRUE to send a complete crash report (Professional Edition

only), FALSE to send only a crash event without full details.

• serverURL – The URL for the Victory server.

• userName – Optional Victory user name. If set to nil, the value ofUIDevice.currentDevice.name is used.

• userEmail – Optional Victory user contact email address. Set to nil if not needed.

Email Crash Report

This method allows the user of your application to email the report using the settings you provide.First, an alert appears. If the user taps the Yes button, then the email UI is displayed, populatedwith the values you specified. When the user taps Send, the message is sent to the specifiedrecipients. The crash data is sent to Compuware APM regardless of whether the user decidesto send the email.

Syntax+ (CPWR_StatusCode) enableCrashReportingWithReport:(BOOL)sendCrashReport

emailRecipients:(NSArray *)recipients

emailSubject:(NSString *)subject

emailMessage:(NSString *)message

emailFilename:(NSString *)filename

sendAppleStyleReport:(BOOL)sendAppleStyleReport

alertTitle:(NSString *)alertTitle

alertMessage:(NSString *)alertMessage

yesButtonText:(NSString *)yesButtonText

noButtonText:(NSString *)noButtonText

Parameters• sendCrashReport – TRUE to send a complete crash report (Professional Edition

only), FALSE to send only a crash event without full details.

• recipients – An array of NSString's, each NSString containing one email address.

• subject – The email subject.

• message – The email body text.

• filename – The name to use for the file attachment containing the crash report. Touse the default name, set to nil.

• sendAppleStyleReport – YES to send an Apple-style crash report; NO to send aJSON-style crash report.

• alertTitle – Title for the alert.

• alertMessage – Message for the alert.

• yesButtonText – Label for the Yes button in the alert. The user taps this button todisplay the email UI.

• noButtonText – Label for the No button in the alert. If the user taps this button, thecrash report is not emailed. The crash report is still sent to the Compuware APM dataserver.

17Mobile Application Monitoring - Free Edition iOS ADK User Guide

Chapter 3 ∙ Instrumentation Details

Page 18: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

setGpsLocationUse this method to record the current GPS location of the user. The ADK does not automaticallycollect any location information.

NOTEThe GPS location is currently not evaluated by the Compuware APM server but the data mightbe available in a future release.

Syntax+ (CPWR_StatusCode) setGpsLocation:(id)gpsLocation

Parameter• gpsLocation – A CLLocation object with GPS coordinates acquired by the

customer's application.

Return Values• CPWR_UemOn – The ADK is initialized and the GPS coordinates were accepted.

• CPWR_UemOff – The ADK is not initialized. The GPS coordinates were accepted.

• CPWR_Error_InvalidParameter – The parameter is invalid.

lastErrorCodeThis method returns the error code associated with the most recent internal ADK error. Zero(0) is returned if there is no error.

Syntax+ (CPWR_StatusCode) lastErrorCode

lastErrorMsgThis method returns the error message associated with the most recent internal ADK error. Ifthere is no error, nil is returned.

Syntax+ (NSString *) lastErrorMsg

flushEventsUse this method to send all collected events immediately.

flushEvents

To reduce network traffic/usage, the collected events are usually sent in packages where theoldest event has an age of up to 9 minutes. Using this method, you can force sending of allcollected events regardless of their age.

Syntax+ (CPWR_StatusCode) flushEvents

Return Values• CPWR_UemOn – The ADK is initialized.

• CPWR_UemOff – The ADK is not initialized.

Mobile Application Monitoring - Free Edition iOS ADK User Guide18

Chapter 3 ∙ Instrumentation Details

Page 19: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

UEMAction Methods

enterActionWithNameThis method starts an action. Call this method at the beginning of the code that you want totime.The action end must be set via a call to leaveAction. If the action is created successfully, thenthe return value is non-nil. If an error occurs, then the return value is nil. Call lastErrorCodeor lastErrorMsg to find out which error occurred.In the Professional Edition, enterActionWithName will result in a mobile action PurePath inCompuware APM.

Syntax+ (UEMAction *) enterActionWithName:(NSString *)actionName

+ (UEMAction *) enterActionWithName:(NSString *)actionName

parentAction:(UEMAction *)parentAction

Parameters• actionName – The name of the action.

• parentAction – The UEMAction object for the parent of this action.

Error Values• CPWR_Error_InvalidParameter – The parentAction is nil, the parent action is

already ended, or the action name is nil or empty.

• CPWR_UemOff – The ADK is not initialized.

• CPWR_TruncatedEventName – The action name was truncated to the maximumlength. This is a warning and the action is still created.

• CPWR_Error_InternalError – A database error occurred.

leaveActionThis method ends a previously started action. All reported events, values, or tagged web requestsbetween the start and end of an action will be part of the action. Call this method at the end ofthe event that you want to time.A leave action can be executed at the parent level; any child actions will be ended with theparent action.

Syntax- (CPWR_StatusCode) leaveAction

Return Values• CPWR_UemOn – The action was ended successfully.

• CPWR_UemOff – The ADK has been shut down.

• CPWR_Error_ActionEnded – The UEMAction has already ended. This meansleaveAction has already been called on it or a parent of it.

• CPWR_Error_InternalError – A database error occurred.

19Mobile Application Monitoring - Free Edition iOS ADK User Guide

Chapter 3 ∙ Instrumentation Details

Page 20: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

• CPWR_Error_ActionNotFound – The action no longer exists. This may happen ifthe action has remained open longer than the send interval.

reportEventWithNameThis method sends an event to the server.In the Professional Edition, the event results in a node of a mobile action PurePath.

Syntax- (CPWR_StatusCode) reportEventWithName:(NSString *)eventName

Parameter• eventName – The name of the event.

Return Values• CPWR_UemOn – The action was ended successfully.

• CPWR_UemOff – The ADK has been shut down.

• CPWR_Error_ActionEnded – The UEMAction has already ended. This meansleaveAction has already been called on it or a parent of it.

• CPWR_Error_InvalidParameter – The event name is nil or empty.

• CPWR_TruncatedEventName – The event name was truncated to the maximum length.This is a warning and the action is still created.

• CPWR_Error_InternalError – A database error occurred.

reportValueWithNameThis method sends a key/value pair to Compuware APM. The value can be processed by ameasure and thus be charted.In the Professional Edition, reportValueWithName results in a node of a mobile action PurePath.

Syntax- (CPWR_StatusCode) reportValueWithName:(NSString *)valueName

intValue:(NSInteger)value

- (CPWR_StatusCode) reportValueWithName:(NSString *)valueName

stringValue:(NSString *)stringValue

Professional Edition only:- (CPWR_StatusCode) reportValueWithName:(NSString *)valueName

doubleValue:(double)doubleValue

Parameters• valueName – The name of the value.

• intValue – An integer value in the range of 0 through 2147483.

• doubleValue – A double value. This parameter is available in the Professional Editiononly.

• stringValue – A string value.

Return Values• CPWR_UemOn – The action was ended successfully.

Mobile Application Monitoring - Free Edition iOS ADK User Guide20

Chapter 3 ∙ Instrumentation Details

Page 21: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

• CPWR_UemOff – The ADK has been shut down.

• CPWR_Error_ActionEnded – The UEMAction has already ended. This meansleaveAction has already been called on it or a parent of it.

• CPWR_Error_InvalidParameter – The value name is nil or empty.

• CPWR_TruncatedEventName – The value name was truncated to the maximum length.This is a warning and the action is still created.

• CPWR_Error_InternalError – A database error occurred.

• CPWR_Error_NotSupportedInFreeMode – The reportValueWithName withdoubleValue is not supported in the Free Edition.

reportErrorWithNameThis method sends a named error to the Compuware APM server.There are instance and class versions of the method, as shown below.In the Professional Edition, it results in a node of a mobile action PurePath.

Syntax- (CPWR_StatusCode) reportErrorWithName:(NSString *)errorName

errorValue:(NSInteger)errorValue

+ (CPWR_StatusCode) reportErrorWithName:(NSString *)errorName

errorValue:(NSInteger)errorValue

Professional Edition only:- (CPWR_StatusCode) reportErrorWithName:(NSString *)errorName

exception:(NSException *)exception

+ (CPWR_StatusCode) reportErrorWithName:(NSString *)errorName

exception:(NSException *)exception

- (CPWR_StatusCode) reportErrorWithName:(NSString *)errorName

errorValue:(NSError)error

+ (CPWR_StatusCode) reportErrorWithName:(NSString *)errorName

errorValue:(NSError)error

Parameters• errorName – The name of the error.

• errorValue – The integer error value.

• error – The description of this error is passed to the server. This parameter is onlysupported in the Professional Edition.

• exception – The description of this exception is passed to the server. This parameteris only supported in the Professional Edition.

Return Values• CPWR_UemOn – The error was created successfully.

• CPWR_UemOff – The ADK has been shut down, or has not been initialized in the caseof the class methods.

• CPWR_Error_ActionEnded – The UEMAction has already ended. This meansleaveAction has already been called on it or a parent of it.

• CPWR_Error_InvalidParameter – The error name is nil or empty.

21Mobile Application Monitoring - Free Edition iOS ADK User Guide

Chapter 3 ∙ Instrumentation Details

Page 22: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

• CPWR_TruncatedEventName – The error name was truncated to the maximum length.This is a warning and the action is still created.

• CPWR_Error_InternalError – A database error occurred.

• CPWR_Error_NotSupportedInFreeMode – The reportErrorWithName methodwith error or exception is not supported in the Free Edition.

getRequestTagHeaderThis method can be instrumented in the Free Edition, but data is only reported when you haveupgraded to the Professional Edition. It returns the name of the HTTP header that you must addto a web request for the dynaTrace server to link it to the UEMAction in the PurePath.You should not normally need this method, because the automatic request tagging should catchall web requests.

Syntax- (NSString *) getRequestTagHeader

getRequestTagValueThis method can be instrumented in the Free Edition, but data is only reported when you haveupgraded to the Professional Edition. It returns the value to assign to the HTTP header returnedby getRequestTagHeader for the dynaTrace server to link it to the UEMAction in the PurePath.You should not normally need this method, because the automatic request tagging should catchall web requests.

Syntax- (NSString *) getRequestTagValue

Lifecycle InstrumentationTo trace the appearance of the views in your app, you should derive your view controllers fromthe special classes that appear in the CompuwareUEM.h file.For example, if you currently have a class derived from UIViewController and you want totrace its appearance, change the class definition so it derives fromCompuwareUEMViewController.The same procedure works for classes defined within Xcode .storyboard, .xib, or .nib files.You just need to set the custom class in the inspector of the related UI object.You should initialize the ADK very early in your application to capture the initial viewappearance. Calling startupWithApplicationName from main() is most desirable

View Controllers

The following types of view controllers can be monitored:

• @interface CompuwareUEMViewController – UIViewController

• @interface CompuwareUEMNavigationController – UINavigationController

• @interface CompuwareUEMPageViewController – UIPageViewController

Mobile Application Monitoring - Free Edition iOS ADK User Guide22

Chapter 3 ∙ Instrumentation Details

Page 23: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

• @interface CompuwareUEMReferenceLibraryViewController –UIReferenceLibraryViewController

• @interface CompuwareUEMSplitViewController – UISplitViewController

• @interface CompuwareUEMTabBarController – UITabBarController

• @interface CompuwareUEMTableViewController – UITableViewController

Application Start Event

If you instrument your application with lifecycle events, the ADK will automatically create aninterval event the first time the first instrumented view appears. This interval event is theApplication Start event. It will be given the name AppStart_YourAppName, where YourAppNameis the name of your application. The interval begins when startup is called and ends when thefirst instrumented view appears. For this reason, it is recommended that, at a minimum, youuse lifecycle monitoring on the first view controller that appears in your application.

LoggingLogging is off by default for the iOS ADK. If you need the ADK log (for example, for debuggingwith iOS Simulator or an attached device), you can change the logging settings at any time.Import CPWRLog.h into your project. For more information, see Adding the iOS ADK to theProject [p. 9].Set the log level by adding this method before the startup call:[CPWRLog setLogLevel:LogLevel];

The available logging levels are:

ALLFINESTFINERFINECONFIGINFOWARNINGSEVEREOFF

23Mobile Application Monitoring - Free Edition iOS ADK User Guide

Chapter 3 ∙ Instrumentation Details

Page 24: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Mobile Application Monitoring - Free Edition iOS ADK User Guide24

Chapter 3 ∙ Instrumentation Details

Page 25: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

C H A P T E R 4

Collected Data

This table describes the metrics and other data collected by the Mobile Application ADK.

DescriptionMetric

The name you chose for the action when instrumenting yourapplication.

Action name

The number of users affected by the crash type or error type.Affected users

The mobile application name.Application name

The version of the application installed on the mobile device.Application version

The percentage of time the application successfully started andran, measured by the following formula:availability % = (sessions – crashes) / sessions

Availability

The average response time (duration) of all application startsand instrumented actions during the selected time period.

Average response time

The battery strength as a percentage of the full charge, reportedas a decimal number 0.00 through 1.0, where 1.0 = 100%

Battery level

charged. If the application is running on a device simulator, thebattery strength will be zero.

The network through which the device is connected to thecellular network or the Internet.

Carrier network

The percentage of users connected through each detected carrier.Carrier usage

The message that describes the crash. The description isretrieved from the signal or exception name produced by theoperating system.

Crash description

The date and time when the crash occurred. In the User SessionLog in the Mobile Application Performance page, this metricis labeled Crash Occurred At.

Crash occurrence time

The designation for the type of crash; for example, SIGABRT.This data is available for iOS only.

Crash type

25Mobile Application Monitoring - Free Edition iOS ADK User Guide

Page 26: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

DescriptionMetric

The number of crashes that occurred during the selected timeperiod.

Crashes

The data returned by the selected report value event.Data value

The model and version of the mobile device.Device

The lifecycle duration of an action, displayed as mm:ss:SSSS.Events that are not actions have no duration.

Duration

The description of the error as specified in the report error event.Error message

The error message number as specified in the report error event.Error number

The number of errors that occurred during the selected timeperiod.

Errors

The name of the lifecycle event, specified when the applicationwas instrumented.

Event [or Event name]

The date and time when an action began. For lifecycle eventsthat are not actions, the date and time the event occurred.

Event start time

The event type designation, and the data type (e.g. String) ifapplicable.

Event type

The number of lifecycle events that were completed during thesession in which the selected crash occurred.

Events in sequence

The longest response time within the selected time period.Maximum response time

Percentage of total available memory.Memory usage

The shortest response time within the selected time period.Minimum response time

The device platform: iOS or Android. If the application isrunning on a device simulator, the operating system is listed.

Mobile platform

The percentage of users connected via each detected protocol.Network protocol usage

The number of applications that were active when the crashoccurred.

Number of applications running

The number of times an incident (action, event, or crash type,depending on the reporting context) occurred.

Occurrences

The number of report events ( reportEventWithName) thatoccurred during the selected time period.

Report events

The number of report value events (reportValueWithName)that occurred during the selected time period.

Report values

A number assigned to an event in the Session Breakdown Logto identify the event and indicate the order in which events werecompleted preceding a crash.

Sequence number

The amount of time a session lasted.Session duration [or Session length]

Total number of sessions active during the selected time period.Sessions

Mobile Application Monitoring - Free Edition iOS ADK User Guide26

Chapter 4 ∙ Collected Data

Page 27: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

DescriptionMetric

Signal strength measured in dBm.Signal strength

The first 10 lines of the selected session's stack trace.Stack trace

NOTEFor iOS devices, the stack trace displays only the hexadecimaladdresses. You must run a script to convert these addresses tomore meaningful information. The screen for an iOS stack tracecontains a download link and instructions for using the script.

The date and time when the session began.Start time [or Session start time]

The total number of unique users during the selected timeperiod. A user that has more than one session is only countedonce.

Unique users

The total number of report events and report value eventsexecuted during the selected time period.

User events

The user ID assigned by the application to associate events withthat specific user.

User ID

The number of users that accessed the selected event.Users

The percentage users using devices with each detected platform.Users by platform

The percentage of users in each detected geographic region.Users by region

27Mobile Application Monitoring - Free Edition iOS ADK User Guide

Chapter 4 ∙ Collected Data

Page 28: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Mobile Application Monitoring - Free Edition iOS ADK User Guide28

Chapter 4 ∙ Collected Data

Page 29: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

C H A P T E R 5

Viewing Application Data

View the performance data collected from your users' devices in the Mobile ApplicationPerformance page.

Before You Begin

It is assumed that you have already activated your new account. If you have not yet done so,refer to the Account Activation email you received after signing up for your account.

NOTEIf you have instrumented the application and tested it but no data appears in the MobileApplication Performance page, verify that you used the correct Server URL in the application,and m.axf8.net is specified in the Server URL. If the Server URL is not specified or is incorrect,your data will not appear in the Mobile Application Performance page.It may be that no data appears in the page because no data was generated during the selectedtime frame.For more information about issues that prevent data from being displayed, include CPWRLog.hin your application and turn on logging. You will be able to see if there are any error messagesbeing logged by the Mobile App ADK code.

1. Log in at http://labs.gomeznetworks.com.The Mobile Application Performance page appears.

2. Use the lists at the top of the window to select the data to display.

• Application – Select the instrumented application for which you want to view thedata.

• Mobile Platform – Select whether to view data from All Platforms (the default),Android devices, or iOS devices.

• Time Period – Select whether to view data from Last 7 days (the default), Yesterday,Today, or Last 24 hours.

29Mobile Application Monitoring - Free Edition iOS ADK User Guide

Page 30: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

The charts display data per day if you select Last 7 days, or data per hour for the otherTime Period options.

3. Select a tab to view detailed data for the selected category.The Summary tab is selected by default. It displays charts for Performance, Availability,Analytics, and Event Tracking. For more detail about each data category, select the tabfor that category. For more information, see Mobile Application Performance Page [p. 30].

At the top of the page are links to support information and additional resources. For moreinformation, see Getting Help [p. 5].For information about the enhanced features that are available in the Professional Edition, clickthe Why Go Premium? link.

Mobile Application Performance PageThe Mobile Application Performance page displays the data collected from instrumentedmobile applications.

NOTEThe first time your instrumented application is started, there is a delay while the applicationinformation is propagated to the database. Therefore, the first few minutes of data collectedafter instrumentation will not be available. After this one-time delay, all collected data will bedisplayed in the Mobile Application Performance page.

Data Filters

Use the lists at the top of the page to filter the data:

• Application – Select the instrumented application for which you want to view the data.

• Mobile Platform – Select whether to view data from All Platforms (the default), Androiddevices, or iOS devices.

• Time Period – Select whether to view data from Last 7 days (the default), Yesterday,Today, or Last 24 hours.The charts display data per day if you select Last 7 days, or data per hour for the otherTime Period options.

Charts

Hover over a bar graph or a data point to display the measurement at the selected time. Hoverover the measurement displayed to the left of a chart to see a tooltip that explains themeasurement.Click a label in the chart legend to remove the data from the graph to focus on data of interest.For example, click Min under the Performance chart to remove the line for the minimumresponse time. Click the label again to restore the data to the graph.

Mobile Application Monitoring - Free Edition iOS ADK User Guide30

Chapter 5 ∙ Viewing Application Data

Page 31: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Tables

You can select columns to display in the tables: Click the list icon at the right side of thetable header, then click a column name to hide or display it. Displayed columns have a circlenext to the name. You can sort a table column by clicking the column head. You may have toclick more than once to sort in the desired order.The columns included in the tables vary depending on the option selected for the MobilePlatform filter. See the table descriptions below for details.

Summary TabThe Summary tab is displayed by default. It provides an overview of performance, availability,analytics, and event tracking for the selected application.The charts on this tab are also displayed on the Performance, Availability, Analytics, andEvent Tracking tabs, with additional details for each data category. For details, see below.

Performance Tab

Chart

The Performance chart displays line graphs for maximum, average, and minimum responsetimes over time of the Action events and Application Start events. For more information, seeMethods for Instrumentation [p. 13].

NOTEThe line graph for the maximum values will peak at 2.5 times the highest average, even if theactual maximum value is greater than that. The tooltips for the data points will show the actualmaximum value.

The average performance displayed to the left of the chart is color coded to indicate performancequality:

• Green – Average response time 3 seconds or less

• Yellow – Average response time 3–5 seconds

• Red – Average response time longer than 5 seconds

Table

Below the chart, the Action Performance Details table lists information for each action.

31Mobile Application Monitoring - Free Edition iOS ADK User Guide

Chapter 5 ∙ Viewing Application Data

Page 32: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

When you select All Platforms in the Mobile Platforms list, the following columns aredisplayed:

• Action Name – The name you chose for the action when instrumenting your application.

• All Platforms – The average response time in seconds for all devices on all platforms.

• iOS – The average response time in seconds for iOS devices.

• Android – The average response time in seconds for Android devices.

• Occurrences – The number of times the action occurred.

When you select Android or iOS in the Mobile Platforms list, the following columns displaydata from devices running the selected platform:

• Action Name – The name you chose for the action when instrumenting your application.

• Average – The average response time in seconds.

• Maximum – The maximum response time in seconds.

• Minimum – The minimum response time in seconds.

• Occurrences – The number of times the action occurred.

The bars next to the values in each column provide a visual indication of the relative values,for example, which actions have the highest or lowest values.The following figure shows the table with All Platforms selected.

Availability TabNOTETo display accurate Availability data, you must have crash reporting enabled.

Chart

The Availability chart shows the average availability, the number of errors, and the number ofcrashes for the selected time period.Availability is calculated as a percentage of the total sessions, using the following formula:(sessions – crashes) / sessions

The availability percentage displayed to the left of the chart is color coded to indicate performancequality:

• Green – Availability 95% or better

• Yellow – Availability 90% to 95%

• Red – Availability less than 90%

Mobile Application Monitoring - Free Edition iOS ADK User Guide32

Chapter 5 ∙ Viewing Application Data

Page 33: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

The chart contains:

• An Availability bar graph for each time interval when data was collected.

• An Errors line graph with data points for each time interval when errors occurred.

• Crashes data points for each time interval when crashes occurred.

Details Tabs

Below the chart, two tabs provide details for crashes and errors:

Crash DetailsThe Crash Details tab lists summary information for each crash type. You can drill downfrom a crash description to display more detailed information. For more information, seeDrilling Down to Crash Details [p. 34].When you select All Platforms in the Mobile Platforms list, the following columns aredisplayed:

• Crash Description – The message that describes the crash. The description is retrievedfrom the signal or exception name produced by the operating system.

• Android – The number of sessions during which the crash type occurred on Androiddevices.

• iOS – The number of sessions during which the crash type occurred on iOS devices.

• Affected Users – The number of users affected by the crash type or error type.

When you select Android or iOS in the Mobile Platforms list, the following columnsdisplay data from devices running the selected platform:

• Crash Description – The message that describes the crash. The description is retrievedfrom the signal or exception name produced by the operating system.

• Occurrences – The number of times the crash type occurred.

• Affected Users – The number of users affected by the crash type or error type.

The following figure shows the table with All Platforms selected.

33Mobile Application Monitoring - Free Edition iOS ADK User Guide

Chapter 5 ∙ Viewing Application Data

Page 34: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Error DetailsThe Error Details tab lists information for each error type.When you select All Platforms in the Mobile Platforms list, the following columns aredisplayed:

• Error Message – The description of the error as specified in the report error event.

• Error Number – The error message number as specified in the report error event.

• All Platforms, Android, and iOS – The number of times the crash type occurred onall platforms, on Android devices, and on iOS devices.

• Affected Users – The number of users affected by the crash type.

When you select Android or iOS in the Mobile Platforms list, the following columnsdisplay data from devices running the selected platform:

• Error Message – The description of the error as specified in the report error event.

• Error Number – The error message number as specified in the report error event.

• Occurrences – The number of times the crash type occurred.

• Affected Users – The number of users affected by the crash type.

The following figure shows the table with All Platforms selected.

Drilling Down to Crash DetailsDrill down from the Crash Details table in the Availability tab to review details of crashes,including stack traces.

Crash: Session Logs

Click an item in the Crash Description column to drill down to information about the usersessions in which the selected crash occurred.

Mobile Application Monitoring - Free Edition iOS ADK User Guide34

Chapter 5 ∙ Viewing Application Data

Page 35: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

The crash description, Application name, and Crash Type are listed at the top of the window,which also contains the following information:

User Session LogThe User Session Log table contains the following columns:

• User ID – The user ID assigned by the application to associate events with that specificuser. A user ID may be listed more than once if that user had multiple sessions duringwhich the crash occurred.

• Session Start Time – The date and time when the session began.

• Crash Occurred At – The date and time when the crash occurred.

• Stack Trace – Click the icon to display the Stack Trace tab in a popup window, asdescribed below, for the selected crash occurrence.

• Events in Sequence – The number of lifecycle events that were completed duringthe session in which the selected crash occurred.

Event SequenceSelecting a row in the User Session Log displays a thumbnail of the event sequence. Thethumbnail lists the last 10 events that were completed, with the crash name at the bottomof the list. The right side of the thumbnail is a waterfall chart of the event timeline.To hide all events that are not actions, select Show Actions Only below the thumbnail.Click the More Details link below the thumbnail to display the Event Sequence tab,which provides additional information as described below.

To return to the Availability tab, click Availability in the top left corner.

Stack Trace Tab

The Stack Trace tab displays identifying details for the selected session, and the first 10 linesof the session's stack trace.

Session DetailsThe session details section provides the following information:

• Crash – The crash description.

• User ID – The user ID assigned by the application to associate events with that specificuser.

• Session Start Time – The date and time when the session began.

• Crash Occurred At – The date and time when the crash occurred.

Click Device Information to display the following details:

• Mobile Platform – The device platform: iOS or Android. If the application is runningon a device simulator, the operating system is listed.

• Device – The model and version of the mobile device.

• Battery Level – The battery strength as a percentage of the full charge, reported asa decimal number 0.00 through 1.0, where 1.0 = 100% charged. If the applicationis running on a device simulator, the battery strength will be zero.

35Mobile Application Monitoring - Free Edition iOS ADK User Guide

Chapter 5 ∙ Viewing Application Data

Page 36: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

• Memory Usage – Percentage of total available memory.

• Signal Strength – Signal strength measured in dBm. Signal strength is only availablefrom Android devices. If the application is running on a device simulator, no signalstrength will be listed.

• Number of Apps Running – The number of applications that were active when thecrash occurred.

• Carrier Network – The network through which the device is connected to the cellularnetwork or the Internet.

Stack TraceThe application name and version, and the crash type, are displayed above the lines fromthe stack trace.

NOTEFor iOS devices, the stack trace displays only the hexadecimal addresses. You must run a scriptto convert these addresses to more meaningful information. The screen for an iOS stack tracecontains a download link and instructions for using the script.

Use the Previous and Next links in the top right corner to display information for other sessionswithout returning to the User Session Log table.To close the window, click the close icon ( X ) in the top right corner.

Event Sequence Tab

The Event Sequence tab displays the crash description, user ID, and session start time for theselected session. It contains a table that provides the following information for each event:

• The sequence number.

• The event name and event type.

• A bar in the Timeline waterfall chart that graphically depicts the relative start time andduration.

• The start date and time for the event.

• The duration of the event. A horizontal line indicating “no available data” is displayed forevents that have no time duration.

The final row in the table lists the crash description. The Timeline and Duration columns forthe crash display solid red lines. The Start Time column lists the date and time when the crashoccurred.To hide all events that are not actions, select Show Actions Only below the table.Use the Previous and Next links in the top right corner to display information for other sessionswithout returning to the User Session Log table.To close the window, click the close icon ( X ) in the top right corner.

Mobile Application Monitoring - Free Edition iOS ADK User Guide36

Chapter 5 ∙ Viewing Application Data

Page 37: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Analytics Tab

Chart

The Analytics chart displays:

• A Sessions bar graph with data for each time interval when data was collected.

• A Users line graph with data points for each time interval when data was collected.

The total number of users and the total number of sessions for the selected time period aredisplayed to the left of the chart.

NOTEA user or session may be represented in multiple intervals. Adding all the intervals togethermay give a different number than the total, which is the unique users or sessions over the selectedtime period. A user that has more than one session is only counted once.

A session starts when the application is first launched or is activated, and ends when theapplication is stopped or is inactive for 5 minutes. Each user may have more than one session.

Details Tabs

The tabs below the chart provide additional detail about users and sessions:

DemographicsThe pie charts provide demographic information about the application's users.

• Users by Platform – The percentage users using devices with each detected platform.

• Users by Region – The percentage of users in each detected geographic region.

• Network Protocol Usage – The percentage of users connected via each detectedprotocol.

• Carrier Usage – The percentage of users connected through each detected carrier.

Hover over a section of a pie chart to see a tooltip that displays the percentage and theactual number of users (or occurrences of a protocol or carrier) that it represents.

NOTEIf any names in the chart legends are truncated, the tooltip will display the full name.

37Mobile Application Monitoring - Free Edition iOS ADK User Guide

Chapter 5 ∙ Viewing Application Data

Page 38: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Session Length DistributionThe Session Length Distribution tab contains a bar graph that enables you to see thetypical session length for your application. The x-axis lists session durations ranging from0–3 seconds through 10+ minutes. The y-axis measures the number of sessions for eachduration.For example, you may see that most sessions lasted 3–5 minutes, which is what you wouldexpect for application use. If, however, the graph shows an unexpectedly large numberof sessions that lasted only 4–10 seconds, this may indicate that an error occurs within 10seconds of starting the application.

Event Tracking Tab

Chart

The Event Tracking chart displays bar graphs that depict the number of report value events(reportValueWithName) and report events (reportEventWithName) that occurred at eachinterval during the selected time period. For more information, see Methods for Instrumentation[p. 13].To the left of the chart, you can see the total number of events and the number of each type ofevent for the selected time period.

Mobile Application Monitoring - Free Edition iOS ADK User Guide38

Chapter 5 ∙ Viewing Application Data

Page 39: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Table

The Event Tracking Details table provides information about the events.When you select All Platforms in the Mobile Platforms list, the following columns aredisplayed:

• Event – The name of the lifecycle event, specified when the application was instrumented.

• Event Type – The event type designation, and the data type (e.g. String) if applicable.

• Data Value – The data returned by the selected report value event.

• All Platforms – The number of times this event occurred on both Android and iOS devices.

• Android – The number of times this event occurred on Android devices.

• iOS – The number of times this event occurred on iOS devices

• Users – The number of users that accessed the selected event.

When you select Android or iOS in the Mobile Platforms list, the following columns displaydata from devices running the selected platform:

• Event – The name of the lifecycle event, specified when the application was instrumented.

• Event Type – The event type designation, and the data type (e.g. String) if applicable.

• Data Value – The data returned by the selected report value event.

• Occurrences – The number of times this event occurred on devices with the selectedplatform.

• Users – The number of users that accessed the selected event.

The bars next to the values in each column provide a visual indication of the relative values,for example, which events have occurred most often or least often.The following figure shows the table with All Platforms selected.

39Mobile Application Monitoring - Free Edition iOS ADK User Guide

Chapter 5 ∙ Viewing Application Data

Page 40: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Profile PageIn the My Profile page, you can review or update your personal information and select whetherto receive email related to Compuware products.To display this page, click the My Profile link at the top right of the Mobile ApplicationPerformance or Support page.You cannot change your username, account name, or access level. You can update your nameand address, change your password, and select different challenge questions for login security.At the bottom of the page, you can select whether to receive emails from Compuware to stayinformed about technical information, product upgrades and releases, corporate news, andbenchmark information. All email options are selected by default. If you do not want to receiveany category of email, clear the check box for that category.After you change any of the information in this page, click Update at the bottom of the pageto save the changes.

Mobile Application Monitoring - Free Edition iOS ADK User Guide40

Chapter 5 ∙ Viewing Application Data

Page 41: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

Index

Aadding iOS ADK to project 9API 13Availability tab

34drilldown 34

Bbest practices 7

Ccarrier data 37collected metrics 25Compuware APM Community 5crash reporting

15, 34viewing data 34

Ddata collected 25

Eemail options 40emailing crash reports 15enableCrashReportingWithReport method 15enterActionWithName method 19

FflushEvents method 18

GgetRequestTagHeader method 22getRequestTagValue method 22

Hhelp 5HockeyApp 15

Iinstrumentation 7, 9–10, 13, 22

See also methodsbasic 10best practices 7lifecycle events 22overview 9

See also methodsIntroduction 5

LlastErrorCode method 18lastErrorMsg method 18leaveAction method 19lifecycle events 22logging 23

Mmethods

13–15, 18–22enableCrashReportingWithReport 15enterActionWithName 19flushEvents 18getRequestTagHeader 22getRequestTagValue 22lastErrorCode 18lastErrorMsg 18leaveAction 19reportErrorWithName 21reportEventWithName 20reportValueWithName 20setGpsLocation 18setMonitorCookie 13

41Mobile Application Monitoring - Free Edition iOS ADK User Guide

Index

Page 42: Mobile Application Monitoring - Free Edition iOS ADK …akamai-cdn.gomeznetworks.com/MobileADK/SR2012/Compuware_APM_iOS...Please direct questions about dynaTrace or comments on this

methods (continued)shutdown 14startupWithApplicationName 14

Mobile Application Performance page29–32, 37–38

Analytics tab 37Availability tab 32Event Tracking tab 38Performance tab 31Summary tab 31

My Profile page 40

Nnetwork data 37

Ooperating systems 7Overview 5

Ppassword 40Preface 5privacy policy 7

QQuincy server 15

RreportErrorWithName method 21reportEventWithName method 20reportValueWithName method 20

SsetGpsLocation method 18setMonitorCookie method 13shutdown method 14startupWithApplicationName method 14support 5

Uupdating personal information 40user demographics 37

VVictory server 15viewing data 29–32, 37–38

XXcode project

9adding iOS ADK 9

Mobile Application Monitoring - Free Edition iOS ADK User Guide42

Index