HomeDocumentationAPI Reference
Getting StartedAPI ReferenceHelp CenterVideo Tours

Instrumentation

This page explains the automatic and custom instrumentations offered among multiple APM metrics for Android apps.

Spans

Spans allow you to understand better the root causes of the latencies that occur during your app’s launch and screen loading. This section provides a detailed breakdown of the duration of the platform life cycle stages, network calls, and more information during the app launch and screen loading.

1318

Spans Table Breakdown

Span NameThis shows the stage or request name to identify its source.
P50This is the 50th percentile, which is the maximum latency that 50% of all the occurrences have in the selected time period and is shown in ms.
P95This is the 95th percentile, which is the maximum latency that 95% of all the occurrences have in the selected time period and is shown in ms.
P50 & P95 ChangeThis shows the change rate of P50 & P95 durations in comparison to the last period based on the selected date filter.
Average CallsThis shows how many times the span happened per single occurrence to understand its redundancy better. To get the overall duration of this span, multiply the Average Call by the P50/P95.
FrequencyThis is how many times the span happened per all occurrences of the specified metric.

Supported Span Types

These are the currently supported Span Types:

  • View Loading
  • Network
  • App Initialization
  • Fragments

📘

If you are using the EndAppLaunch or EndScreenLoading APIs, Instabug captures the duration from the start of the app launch or screen loading up until the call of any of both APIs.

Fragments

Instabug does not capture Fragments by default on Android, so you can use the following steps to capture and display them on your dashboard.

  1. Add the below dependency to your project's build.gradle file.
buildscript {
    dependencies {
        // ...
        classpath 'com.instabug.library:instabug-plugin:x.x.x' // Replace x.x.x with your current SDK version
    }
}
  1. Add the below plugin to your application's build.gradle file.
apply plugin: 'instabug-apm'

Instabug {
    APM {
        fragmentSpansEnabled true
    }
}

📘

Instabug supports Fragments starting from androidx.fragment:fragment:1.2.0 or above and starting from SDK version 11.7.0.

Enable/Disable Fragments

Capturing Fragments can be enabled or disabled accordingly by using the API below:

//Enable
APM.setFragmentSpansEnabled(true)
//Disble
APM.setFragmentSpansEnabled(false)
//Enable
APM.setFragmentSpansEnabled(true)
//Disble
APM.setFragmentSpansEnabled(false)