<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title><![CDATA[Afzaal Ahmad Zeeshan - Elastic Observability Labs]]></title>
    <description><![CDATA[Trusted security news & research from the team at Elastic.]]></description>
    <copyright><![CDATA[© 2026. Elasticsearch B.V. All Rights Reserved]]></copyright>
    <image>
      <title><![CDATA[Afzaal Ahmad Zeeshan - Elastic Observability Labs]]></title>
      <url>https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/bltad972c1c27dbefc6/6a88d9782904ea5e8511d473/observability-labs-thumbnail.png</url>
      <link>https://www.elastic.co/observability-labs/author/afzaal-zeeshan</link>
    </image>
    <link>https://www.elastic.co/observability-labs/author/afzaal-zeeshan</link>
    <atom:link href="https://www.elastic.co/observability-labs/rss/author/afzaal-zeeshan.xml" rel="self" type="application/rss+xml"/>
    <language><![CDATA[en]]></language>
    <lastBuildDate>Tue, 24 Nov 2026 16:59:48 GMT</lastBuildDate>
  <item>
    <title><![CDATA[Mobile SLOs with EDOT Android: Crash-free sessions and ANRs in Elastic Observability]]></title>
    <description><![CDATA[A phone has one user, so the numbers that tell you a backend is healthy tell you almost nothing about an app. Crash-free session rate, ANR rate and screen latency at p95 do, and EDOT Android reports all three, though ANRs arrive one launch late.]]></description>
    <content:encoded><![CDATA[<p>One tap on an Android screen produces four spans across two services, and they all land in the same trace in the same cluster. Three Gradle plugins get you there.</p><p>Elastic Distribution of OpenTelemetry (EDOT) Android sends spans and crashes, along with session IDs, to the Elastic Managed OpenTelemetry Protocol (mOTLP) endpoint, which puts them beside your existing service telemetry. Crash-free session rate and screen latency stop being numbers that you check on a separate console once a week and become error-budget signals that you can alert on. Application Not Responding (ANR) errors need one more step, since Android only reports them on the launch after they happen.  We’ll cover that later in this blog post.</p><p>There are also the questions of why mobile telemetry belongs in the same cluster as your back end at all and what EDOT Android adds over the upstream OpenTelemetry (OTel) SDK, as well as how the prebuilt Kibana dashboards hold up against one you build yourself.</p><p>For the tasks we cover in this post, you need an Elastic cluster and enough familiarity with Kibana to find your way around. You can create a new account for<a href="https://cloud.elastic.co/registration?page=docs&amp;placement=docs-body"> Elastic Cloud</a>; the hosted<a href="https://www.elastic.co/docs/reference/opentelemetry/managed-inputs/managed-otlp-endpoint"> mOTLP</a> endpoint runs on Elastic Cloud only, so self-hosted clusters are out.</p><h2>Why mobile telemetry belongs in the same cluster as your back end</h2><p>Elastic offers a complete suite of observability for enterprises and teams of all sizes. Elastic can collect operational data, such as metrics, logs, traces, and more insights, from the platforms. As shown in the diagram below, we’re using the <a href="https://www.elastic.co/docs/reference/opentelemetry/managed-inputs/managed-otlp-endpoint">Elastic mOTLP endpoint</a>:</p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/bltee9884c36d3262ed/6b040551456a4367e3133720/image3.png" alt="Mobile and backend sources send OTLP to the Elastic Managed OTLP endpoint, stored in Elasticsearch and explored in Kibana" /><p>Although Elastic supports cross-cluster search and view, it’s often better and simpler to ingest the data in the same cluster. </p><p>I recommend taking a look at how <a href="https://www.elastic.co/docs/manage-data/data-store/data-streams">data streams</a> optimize the data ingestion for append-only time series data.</p><h2>What SLOs should you set for a mobile app?</h2><p>As your business expands into the mobile space, your site reliability engineering (SRE) practices and skills can also be applied to mobile markets and platforms. For new entrants to the mobile market, it’s important to provide the same experience on mobile devices as you provide on web platforms. A site reliability engineer (SRE) looks at:</p><ul><li><p>Monitors, to track the traceability of the requests and metrics of the performance, as well as any logs from the services. </p></li><li><p>Service Level Indicators (SLIs) and Service Level Objectives (SLOs), along with (potentially) Service Level Agreements (SLAs). </p></li><ul><li><p>SLA is a legal / business term that’s often skipped on the technical side of SRE. </p></li><li><p>Common practice has SREs focusing primarily on the SLOs.</p></li></ul><li><p>Detecting and handling incidents, in addition to preventing them. </p></li></ul><p>Your mobile apps are deployed on phones and isolated from other devices. Your SRE team is looking for the impact of network coverage on the action that your customer is trying to take, rather than for stress on a single device or the network service coverage alone. . For example, the mobile SRE is interested in knowing which sessions are more likely to finish a purchase and what device and app scenarios help them complete the purchase. Your SRE may have an SLO to ensure that the OrderActivity page:</p><ul><li><p>Never lags or gets stuck because of poor network connectivity.</p></li><li><p>Never crashes because of a bug in state, user input, or server outage.</p></li><li><p>Always tracks the interactions that a user is performing on the page. </p></li></ul><p>If you already have the observability and reporting data from your backend services, you’re likely halfway there. You only need to enrich the service-side analytics with the mobile-side reporting to know the full picture. </p><p>Because the data lives in the same cluster, your Kibana dashboards can report the overall performance of the requests with spans and traces. In the figure below, the trace shows the single interaction from the user’s device’s screen, all the way to the execution: </p><ul><li><p>The interaction starts with the task.create (a tap on the screen).</p></li><li><p>The app sends a POST request to the backend server to create a new task. </p></li><li><p>The HTTP request (which is out of the mobile app’s control and is part of the web app) runs through completion. </p></li><li><p>The simulated web app internals mimic the task creation.</p></li></ul><p>Since we’re using the same cluster for mobile app instrumentation and sending our backend OTel signals, we get a complete picture of the event. We can see which segments take the most time and where the biggest bottleneck is:</p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blta619c13d2b09ab10/6b0405a582d8ae8477543495/image7.png" alt="Kibana trace waterfall: an Android task.create span of 95 ms with nested POST and backend spans across two services" /><h2>Instrumenting your Android app with EDOT</h2><h3>EDOT Android versus the upstream OTel SDK</h3><p>Elastic clusters work <a href="https://www.elastic.co/observability/opentelemetry">natively</a> with the OTel SDKs. Elastic is also among the <a href="https://opentelemetry.io/blog/2024/elastic-contributes-continuous-profiling-agent/">contributors</a> and supporters of the open source (also known as <em>upstream</em>) OTel SDKs. </p><p>Although you can use either the OTel SDK or EDOT for Android, both can transmit the data to the Elastic cluster. However, the integration of EDOT is straightforward for Elastic clusters. EDOT is preconfigured for Elastic Observability but also offers default standards and better developer experience. For example, EDOT supports <a href="https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/android/configuration#r8-mapping-upload">R8 mapping uploads</a> so that obfuscated stack traces are readable in Kibana. </p><p>For a complete list of features available in both, check out the <a href="https://www.elastic.co/docs/reference/opentelemetry/compatibility/edot-vs-upstream">comparison reference</a>. </p><p>In this scenario, I ran a <a href="https://github.com/afzaal-ahmad-zeeshan/elastic-android-otel-mobile-sre">demo Android app</a> (the friendly “todos” app). Its goal is to transmit the events and telemetry. After the data is on the Elastic cluster and the Android OTel Assets package is installed, the dashboards start to show the insights. Set the time range so it covers your test run.</p><h3>Adding the EDOT Android Gradle plugins</h3><p>You can find the configuration steps in the Android app folder itself, but the following snippet shows how to set up the instrumentation for your Android apps: </p>// app/build.gradle.kts
plugins {
    id("com.android.application")
    id("co.elastic.otel.android.agent") version "1.11.0"
    id("co.elastic.otel.android.instrumentation.okhttp") version "1.11.0"
    id("co.elastic.otel.android.instrumentation.crash") version "1.11.0"
}<p>Note that the crash plugin is optional. It reports the crashes as log events with the session ID and the stack trace. Without it, the dashboards have no crash events to count. Together with the OkHttp plugin, these are the automatic instrumentations that EDOT Android provides.</p><p>Then, inside the Application.onCreate method, add:</p>class DemoApp : Application() {
    override fun onCreate() {
        super.onCreate()
        val agent = ElasticApmAgent.builder(this)
            .setServiceName("mobile-demo-android")
            .setServiceVersion(BuildConfig.VERSION_NAME)
            .setExportUrl(BuildConfig.OTLP_ENDPOINT)
            .setExportAuthentication(Authentication.ApiKey(BuildConfig.OTLP_API_KEY))
            .build()
    }
}<p>After the agent is running, you can create spans anywhere in the app. A small helper keeps the call sites short:</p>// agent is the ElasticApmAgent returned by build() above
val tracer = agent.getOpenTelemetry().getTracer("dev.edotdemo.app")

fun &lt;T&gt; action(name: String, block: () -&gt; T): T {
    val span = tracer.spanBuilder(name).startSpan()
    val scope = span.makeCurrent()          // HTTP spans created inside become children
    try {
        return block()
    } catch (e: Throwable) {
        span.recordException(e)
        span.setStatus(StatusCode.ERROR, e.message ?: e.javaClass.simpleName)
        throw e
    } finally {
        scope.close()
        span.end()
    }
}

// Usage: the okhttp span for the sync call is nested under "sync"
action("sync") { api.sync(user) }<p>makeCurrent() links the tap to the network call. The <a href="https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/android">EDOT SDK for Android</a> configures most of the settings for you. Review the docs to learn the complete details of what’s done for you and what you need to provide.</p><h2>Installing the Android OTel Assets dashboards in Kibana</h2><p>Kibana gives you two ways to see the telemetry that your Android app is now sending. The first is the official integration that’s available in Elastic cluster. You can install the packages (for example, Android OpenTelemetry Assets) directly via the <strong>Integrations</strong> tab in Kibana (<strong>/app/integrations</strong>) or by visiting the documentation page for each integration, such as the <a href="https://www.elastic.co/docs/reference/integrations/otel_android_dashboards">Android OpenTelemetry Assets</a>. </p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt1b432ad43a8a34ea/6b04063332e91e376175cf39/image8.png" alt="[Android OTel] Exception Details dashboard in Kibana showing 20 crash occurrences across 16 affected Android installations" /><p>This dashboard comes from the Android OpenTelemetry Assets content package. Once your app has sent the data, and you have the package installed, Kibana adds the <strong>[Android OTel] Application Overview</strong> and <strong>[Android OTel] Exception Details</strong> dashboards. The dashboards query <strong>logs-generic.otel*</strong> and <strong>traces-generic.otel*</strong> data for <strong>os.name: "Android"</strong>; they aren’t tied to EDOT. They populate as soon as the expected fields (such as <strong>session.id</strong>, <strong>service.name</strong>, and the <strong>exception.*</strong> fields) arrive. EDOT Android sets all these for you. If you use another OTel Android SDK, you can supply them yourself. </p><p>While this dashboard is managed by Elastic, you can create a copy of the dashboard to customize it.</p><p>We want to go one step further and we want to create a custom dashboard that gives us a better view of what is happening in our mobile app, how the customers are creating sessions and using the app, along with different stages of the application. </p><h2>Building a crash-free sessions dashboard in Kibana</h2><p>Building your own dashboards lets you report on whatever your operations team actually asks for. Kibana offers you the ability to create dashboards using the data that you have indexed. Once you have the data indices, you can use them in the Kibana dashboards to generate charts and graphs for any reporting. My favorite approach to creating the dashboards is with the <a href="https://www.elastic.co/docs/explore-analyze/ai-features/elastic-agent-builder">Elastic AI Agent</a> in the Elastic Cloud (Elastic Serverless and Elastic Stack 9.4.+).</p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt392cdb20be192050/6b04065f32e91e48cc75cf3d/image1.png" alt="Empty Kibana dashboard with the Elastic AI Agent chat panel open, offering to create dashboards from mobile telemetry" /><p>The following video shows a custom dashboard generation using the Elastic’s hosted inference service.</p><p></p><p>You can have a conversation with the AI Agent, and it pulls the insights from your cluster to suggest the dashboards, visualizations, and the data to report on. You are, of course, always in charge. I wanted to create a dashboard that translates the user journeys and user interactions into insights for the operations teams</p><ul><li><p>How many times the app was installed (app.installation.id) or how many sessions (session.id) were created and managed. </p></li><li><p>How many sessions were crash-free, determined by correlating session ID with crash events (app.crash) in the time duration. (See <a href="https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/android/automatic-instrumentation">Automatic instrumentation for the Android apps with EDOT SDK</a>.)</p></li><li><p>How the customers experience the app in terms of performance, including “<a href="https://developer.android.com/topic/performance/issues/anr">app not responding</a>” (ANR) events. </p></li></ul><h3>Does EDOT Android detect ANRs automatically?</h3><p>EDOT Android doesn’t automatically detect “apps not responding” automatically. The automatic instrumentation covers OkHttp and crash reporting. In the demo app, I read Android’s <a href="https://developer.android.com/reference/android/app/ApplicationExitInfo">ApplicationExitInfo</a> on the next launch (Android 11+) and send an app.anr_previous_run event. So an ANR shows up one launch late.</p><p>Just like a slow-performing web page has a degraded <a href="https://amasol.com/slow-load-times-and-their-impact-on-conversion-rates-in-e-commerce/">impact</a> on your commerce economics, ANRs impact the customer journey in apps. To preview this, I asked the AI Agent to build this dashboard for me: </p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt090147f62a45b6df/6b0406a6da47c4e480bddf02/image5.png" alt="Custom Kibana dashboard showing Android crashes and ANRs over time, top crashes by install, cold start p95 and jank" /><p>The dashboard expands the reporting and also keeps crashes, performance, page launches, transitions, and user interactions in the reports. In our use case, we have telemetry from the backend service (which holds the tasks) and the mobile front end. The differentiation of telemetry is important, as it’s used to build dashboards and bring clarity to SRE operations.</p><p>The mobile telemetry (or mobile-specific telemetry) is telemetry collected from the app and focuses on user interactions with the app, but also on native platform-specific calls; for example:</p><ul><li><p>GET/POST calls from the mobile (because these calls are made from the mobile device).</p></li><li><p>Screen, page, or UI control-specific telemetry (task.create, screen.view, etc.).</p></li><li><p>Application-specific tracing and telemetry, such as how long the app was in foreground, sessions, etc.</p></li></ul><p>We also have telemetry that is not mobile-specific such as:</p><ul><li><p>HTTP handlers and their traces.</p></li><li><p>Internal database and resource handlers.</p></li></ul><p>Backend telemetry matters just as much as  </p><p>Kibana goes beyond and allows us to generate custom dashboards based on the data from our telemetry. We can create any dashboard that our operations and business teams need. </p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt66c09a2b11754505/6b0406f2eb41e2473b402b13/image4.png" alt="Custom Android OpenTelemetry dashboard in Kibana: 16 installs, 44 sessions, 72.7% crash-free sessions and 0 ANRs" /><p>If you don’t have these insights, your teams would need to extract these insights from different resources. The information can be gathered from mobile platforms, such as Google Play Store, Firebase, or other analytics and reporting platforms. But you miss out on two things:</p><ol><li><p>The data ingested on other platforms, while can also be ingested on Elastic, is not standardized according to your Elastic cluster defaults, and it is not related to the traces and sessions information generated and produced by your backend services. </p></li><li><p>The platforms maintain a custom structure to the logs, so to generate a big-picture view of the reporting, you always need to translate the source data to a normalized view. </p></li></ol><p>But if you ingest the data to Elastic cluster together with the back end, you can start looking at the big-picture view on your product in minutes. </p><h2>Conclusion: Mobile observability changes what latency and load mean</h2><p>In this article, we explored what it means to have observability in your mobile applications. The typical concepts of <em>latency</em>, <em>load</em>,  a reason to use asynchronous code on mobile apps to keep the <a href="https://developer.android.com/topic/performance/anrs/keep-your-app-responsive">app UI responsive</a>. </p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/bltffc572d3a239965d/6b04075eeb41e236b8402b1d/image6.png" alt="Trace diagram of one mobile journey: the checkout screen waits 620 ms on a backend call, 280 ms of it database time" /><p>With Elastic, you can identify which user sessions are facing problems by merging and enriching the data from backend systems and the mobile platforms. </p><p>You can use the <a href="https://www.elastic.co/docs/reference/integrations/otel_android_dashboards">official Android OTel integration</a> in Elastic to install ready-made dashboards that automatically use the data ingested by the OpenTelemetry SDK for Android to build the dashboard for you. We’d also appreciate your feedback on this article via our <a href="https://discuss.elastic.co/">Discuss</a>, or happy to continue the conversation over at X @afzaalvirgoboy.</p>]]></content:encoded>
    <link>https://www.elastic.co/observability-labs/blog/edot-android-crash-free-sessions-anr</link>
    <guid isPermaLink="false">edot-android-crash-free-sessions-anr</guid>
    <category><![CDATA[OpenTelemetry]]></category>
    <category><![CDATA[APM]]></category>
    <category><![CDATA[Agentic Observability]]></category>
    <dc:creator><![CDATA[Afzaal Ahmad Zeeshan]]></dc:creator>
    <enclosure url="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt0910ab388890c4c6/6b04042b0ad6ef3319d3162c/image2.png" length="0" type="image/png"/>
    <pubDate>Tue, 24 Nov 2026 15:30:00 GMT</pubDate>
  </item>
  </channel>
</rss>