Start Embedding Monitoring in a Mobile App

To add monitoring to a mobile app, you must embed Aternity's monitoring into the app itself, before it is encrypted. This automatically starts reporting a wealth of performance and usage data by default. This article offers an introduction to integrating Aternity's monitoring functionality in a mobile app.

A monitored mobile app is a regular iOS or Android app which has Aternity's monitoring functionality inside, enabling it to report app performance like launch times, errors, crashes, network traffic, and also custom activities performance, and some mobile device data.

Tip

You can quickly find the latest version of this page by going to https://help.aternity.com/mobile.

Monitor mobile devices in Aternity

Choose Monitoring Method

You can embed monitoring in a mobile app in any of the following ways:

Adding a mobile app for monitoring

For more information on adding your app to Aternity to view the performance of custom activities, see Add a Monitored Mobile App as a Managed App to Monitor Custom Activities.

The following table offers a summary of the considerations to choose the best way to embed monitoring in your app.

Tool to embed monitoring OS Speed of implementation Requires access to source code Fine tune monitoring

Aternity iOS Wrapper (learn more)

iOS

Quick

No

No

Aternity Android Wrapper (learn more)

Android

Quick

No

No

Aternity iOS Mobile SDK (learn more)

iOS

Requires re-building the app

Yes

Yes, with API calls

Aternity Android Mobile SDK (learn more)

Android

Requires re-building the app

Tip

To monitor the wait times and usage times to display the UXI, you must also wrap the app.

Yes

Yes, with API calls

Tip

If the mobile device loses network connection, the monitored mobile app stores performance data for up to 30 minutes in offline mode, and resumes when the network connection is restored.

Available APIs

With the Mobile SDK you can insert API calls to fine-tune the monitoring, by dynamically setting properties (like the device name, location), or tag events for use in some types of custom activities, or you can use APIs to report breadcrumbs for later troubleshooting of crashes.

Using the API to monitor your mobile app
Tip

See how all the APIs fit together into a single cohesive procedure for iOS or for Android.

API name Description

activateWithDictionary (iOS) or init (Android)

To start using the APIs, integrate library and configuration files, and initialize your project.

In Android, this is a single step.

In iOS, you first integrate, then you initialize.

setDeviceName

You can set a device name for a mobile app using the Aternity Mobile SDK, to display custom device names in the dashboards.

Learn more about this API in iOS or in Android.

setSite or setOffSite

You can set the location's site name for a mobile app in the Aternity Mobile SDK, to track the performance of all end users in that location.

Learn more about this API in iOS or in Android.

userNameStr

You can set a username for a mobile app in Aternity Mobile SDK to be consistent with desktops and laptops, so you can track this user's experience across all devices and platforms.

Learn more about this API in iOS or in Android.

tagApplicationWithName (iOS) or tagApplication (Android), reportTag, setContextValue

You can tag an event to monitor custom activities in your mobile app by inserting a call to the tagging API. A custom activity for mobile apps starts and ends when the app reports specific events which match the events of an activity's signature file. If Aternity already reports these events by default, you do not need to add manual API calls. However, for some custom activities, you must manually tag and report those events using API calls.

Learn more about these APIs in iOS or in Android.

setCrashCallback (iOS only)

Use setCrashCallback (iOS only) to specify a callback function to run when the app crashes.

Learn more about this API.