Performance
The Performance tab displays a detailed overview of various KPI metrics and charts that are related to application performance. The Performance tab allows you to monitor, analyze, and track key performance indicators (KPIs) that affect the user experience and application stability. The KPIs help you identify trends, optimize performance, and ensure a smooth user experience across different versions of the application.
Supported technologies
The performance metric collection functionality of Instana applies to native Android and iOS applications. This capability is available in the following agent versions:
- Instana Android agent 6.2.0 or later
- Instana iOS agent 1.9.0 or later
Enabling performance metrics collection in Android agent
Make sure that the plug-in and SDK of the Instana Android agent are integrated with your Android application. For more information, see Android agent instructions.
To enable performance metrics collection in the Android agent, set the properties to true
when the Instana.setup()
method is called, as shown in the following example:
class ExampleApp : Application() {
override fun onCreate() {
super.onCreate()
val perf = PerformanceMonitorConfig(
enableAppStartTimeReport = true, // Enable App start time metrics
enableAnrReport = true, // Enable ANR metrics
anrThresholdMs = 5, // This is the wait time until agent report an ANR
enableLowMemoryReport = true) // Enable Low Memory metrics
val instanaConfig = InstanaConfig(
key = "YOUR_APP_KEY",
reportingURL = "YOUR_REPORTING_URL",
enableCrashReporting = true,
performanceMonitorConfig = perf
)
Instana.setup(this, instanaConfig)
}
}
Enabling performance metrics collection in iOS agent
Make sure that the Instana iOS agent is installed. For more information, see iOS agent instructions.
To enable performance metrics collection for the iOS agent, set the properties to true
when the Instana.setup()
method is called, as shown in the following example:
import UIKit
import InstanaAgent
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let options = InstanaSetupOptions(enableCrashReporting: true)
options.perfConfig = InstanaPerformanceConfig(
enableAppStartTimeReport = true, // Enable App start time metrics
enableAnrReport: true, // Enable ANR metrics
anrThreshold: 5.0, // This is the wait time until agent report an ANR
enableLowMemoryReport = true) // Enable Low Memory metrics
Instana.setup(
key: "YOUR_APP_KEY",
reportingURL: "YOUR_REPORTING_URL",
options: options
)
return true
}
}
Viewing the Performance tab in the Instana UI
After you enable performance metric collection for an application, performance-related data is sent to Instana. You can analyze the performance metrics to gain insights into the behavior of the application and optimize its performance.
To view the performance dashboard, complete the following steps:
-
In the sidebar of the Instana UI, select Websites & mobile apps.
-
Select Mobile apps.
-
Click an item from the list of mobile applications.
-
Select the Performance tab.
Figure 1. Mobile app performance tab view
Performance metric for Application Not Responding (ANR)
Monitoring ANR is crucial for identifying and addressing performance issues in Android and IOS applications. If the main thread of an application is blocked for too long, it triggers an ANR error, which disrupts the user experience. This result can lead to user dissatisfaction, poor reviews, and less user interaction. By tracking ANRs, you can find and improve performance roadblocks, restructure code to offload heavy tasks, and use methods that ensure responsive user interactions.
Viewing ANR KPI section on the Performance tab
On the Performance tab, two KPI sections are added to monitor and analyze the impact of ANRs and application freezing on both user sessions and overall users. These KPI sections provide insights into application performance and user experience.
App not responding or freezing affected sessions
The KPI section for ANR-affected sessions shows the percentage of sessions in which users experienced ANRs or application freezing based on the selected time range. You can calculate the ANR-affected sessions by dividing the number of sessions in which ANRs occurred by the total number of unique sessions, as shown in the following formula.
ANR affected sessions = (Number of sessions with ANRs / Total number of unique sessions) * 100
You can use this formula to calculate the percentage of sessions that experienced ANRs. In this way, you can identify users who encounter performance issues during their sessions.
App not responding or freezing affected users
The KPI section for ANR-affected users shows the percentage of unique users who experienced ANRs or application freezing during their session(s) based on the selected time range. You can calculate the ANR-affected users by dividing the number of users for whom ANRs occurred by the total number of unique users, as shown in the following formula.
ANR affected users = (Number of users with ANRs / Total number of unique users) * 100
You can use this formula to identify the unique users who are impacted by ANRs. This formula provides insight into the user experience and helps find potential areas for improvement.
App not responding or freezing chart
The chart corresponds to the occurrence of ANRs, categorized by mobile app platforms (iOS or Android) for a specified time range. The x-axis represents the beacon timestamp and the y-axis represents the combined beacon count. Platform filters can be selected from the chart, which helps you visualize platform-specific beacon count.
Performance metric for App start or launch time
App start or launch time refers to the duration taken by the application to become fully interactive. Monitoring this performance metric helps developers optimize startup times and enhance the overall user experience.
App start times are categorized into three types:
-
Cold start: occurs when the application is launched from a terminated state with no existing processes in memory. Cold start is typically the slowest start type and takes the longest startup time.
-
Warm start: occurs when the application is relaunched from a background state. Few memory resources are cached or present in memory so warm start requires less startup time than cold start.
-
Hot start: occurs when the application is already running in the background and the system brings the application's activity to the foreground. Since the application is active in memory, the system does not have to repeat the initialization or load any resources again allowing it to resume instantly with the fastest startup time.
Cold start time KPI card
The cold start time KPI card on the Performance tab indicates that 75th percentile of cold starts over a period where the application is launched from a fully terminated state. The metric indicates that the 75% of the observed cold start duration falls are less than that value in a given time period.
This calculation of the cold start metric helps in evaluating the application’s typical cold start performance. It excludes the slowest 25% of start times that might be influenced by outliers or extreme conditions. The 75th percentile (also known as third quartile) aggregation is more robust to outliers and provides a more realistic view of the app performance than the average calculation.
The cold start time KPI card helps developers gain a better representation of app performance by identifying trends and the experience of the majority of users. This enables them to target optimizations for faster app start times and improve the overall user experience.
Cold start time chart
The cold start time chart on the Performance tab indicates the 75th percentile of cold start times that are categorized by android and iOS platform over a selected time period.
-
X-axis: Beacon timestamps (time series).
-
Y-axis: 75th percentile of cold start durations over the selected time.
The cold start time chart enables the developers to analyze the 75th percentile of cold start time by platform(iOS and android) and identify platform-specific bottlenecks and optimization opportunities.
Performance metric for Low memory
Low memory events are triggered when a device is running out of resources, leading to slower responses and crashes. This might adversely affect user experience and significantly impact the business. Reporting Low memory events to Instana is crucial for developers to quickly identify underlying issues and provide appropriate solutions.
Low memory chart
The chart corresponds to the occurrence of Low memory events, which are categorized by mobile app platforms (iOS or Android) for a specified time range. The x-axis represents the beacon timestamp and the y-axis represents the combined beacon count. Platform filters can be selected from the chart, which helps you visualize platform-specific beacon count.