<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/adding-firebase-performance-monitoring-to-a-jetpack-compose-app-rk6busoxg" -->

---
title: Adding Firebase Performance Monitoring to a Jetpack...
description: This tutorial walks through adding Firebase Performance Monitoring to an Android app built with Jetpack Compose, part six of a series on building an app with...
canonical: https://daily.dev/posts/adding-firebase-performance-monitoring-to-a-jetpack-compose-app-rk6busoxg
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Adding Firebase Performance Monitoring to a Jetpack Compose app | daily.dev
og:description: This tutorial walks through adding Firebase Performance Monitoring to an Android app built with Jetpack Compose, part six of a series on building an app with...
og:url: https://daily.dev/posts/adding-firebase-performance-monitoring-to-a-jetpack-compose-app-rk6busoxg
og:image: https://api.daily.dev/og/posts/RK6busOxg.png
og:image:alt: Adding Firebase Performance Monitoring to a Jetpack Compose app
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding Firebase Performance Monitoring to a Jetpack Compose app

**[Firebase](https://daily.dev/sources/firebase-blog)** · 8 min read · 0 upvotes · 0 comments

## Summary

This tutorial walks through adding Firebase Performance Monitoring to an Android app built with Jetpack Compose, part six of a series on building an app with Firebase tools. It explains automatic metrics like app start time, screen rendering, and network requests, then shows how to add the Performance Monitoring SDK and Gradle plugin, and how to create custom traces since automatic screen rendering collection isn't yet available for Jetpack Compose apps with a single Activity. Code examples demonstrate creating a reusable trace() inline function and applying it to an authentication function.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://firebase.blog/posts/2022/11/adding-performance-monitoring-to-jetpack-compose-app>

## Questions this post answers

### Why doesn't automatic screen rendering monitoring work in my Jetpack Compose Android app with Firebase Performance Monitoring?

Automatic screen rendering collection relies on the lifecycle of Activity and Fragment classes, which Firebase Performance Monitoring uses to detect screen transitions. Jetpack Compose apps typically use only a single Activity, so this automatic tracking is not available. Instead, developers need to create custom traces using the Performance Monitoring API to measure screen performance manually.

_Developers wiring up Compose observability compare tooling gaps and workarounds on daily.dev._

### How do I create a custom trace with Firebase Performance Monitoring in Android?

Call Trace.create(String) with a trace name, then use the start() and stop() methods to bookmark the code you want to measure. A convenient pattern is an inline function like trace(name, block) that wraps Trace.create(name).trace(block), automatically starting and stopping the trace around the given code block and exposing the trace object for adding custom attributes and metrics.

_Teams instrumenting Android code paths track patterns like this on daily.dev._

## Similar posts on daily.dev

- [Jetpack Compose Performance Optimization](https://daily.dev/posts/jetpack-compose-performance-optimization-qw7nfjbya) · Towards Dev · 7 upvotes · 0 comments
- [Android Developers Blog: Deeper Performance Considerations](https://daily.dev/posts/android-developers-blog-deeper-performance-considerations-qsbtzemol) · Android Developers Blog · 1 upvotes · 0 comments
- [Fully Optimized: Wrapping up Performance Spotlight Week](https://daily.dev/posts/fully-optimized-wrapping-up-performance-spotlight-week-h5xryptkz) · Android Developers Blog · 1 upvotes · 0 comments

---

Tags: [#android](https://daily.dev/tags/android), [#kotlin](https://daily.dev/tags/kotlin), [#firebase](https://daily.dev/tags/firebase), [#jetpack-compose](https://daily.dev/tags/jetpack-compose)

[View this post on daily.dev](https://daily.dev/posts/adding-firebase-performance-monitoring-to-a-jetpack-compose-app-rk6busoxg)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Adding Firebase Performance Monitoring to a Jetpack Compose app","url":"https://daily.dev/posts/adding-firebase-performance-monitoring-to-a-jetpack-compose-app-rk6busoxg","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/adding-firebase-performance-monitoring-to-a-jetpack-compose-app-rk6busoxg"},"datePublished":"2026-08-23T12:21:20.938Z","dateModified":"2026-08-23T12:45:10.317Z","description":"This tutorial walks through adding Firebase Performance Monitoring to an Android app built with Jetpack Compose, part six of a series on building an app with...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/39917a115a944b0e37d363655145490b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/39917a115a944b0e37d363655145490b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Firebase","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Firebase","logo":"https://media.daily.dev/image/upload/s--i395oqZH--/f_auto,q_auto/v1787487448/logos/firebase-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/firebase-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/adding-firebase-performance-monitoring-to-a-jetpack-compose-app-rk6busoxg","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"android,kotlin,firebase,jetpack-compose","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Firebase","item":"https://daily.dev/sources/firebase-blog"},{"@type":"ListItem","position":3,"name":"Adding Firebase Performance Monitoring to a Jetpack Compose app"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/adding-firebase-performance-monitoring-to-a-jetpack-compose-app-rk6busoxg#faq","mainEntity":[{"@type":"Question","name":"Why doesn't automatic screen rendering monitoring work in my Jetpack Compose Android app with Firebase Performance Monitoring?","acceptedAnswer":{"@type":"Answer","text":"Automatic screen rendering collection relies on the lifecycle of Activity and Fragment classes, which Firebase Performance Monitoring uses to detect screen transitions. Jetpack Compose apps typically use only a single Activity, so this automatic tracking is not available. Instead, developers need to create custom traces using the Performance Monitoring API to measure screen performance manually. Developers wiring up Compose observability compare tooling gaps and workarounds on daily.dev."}},{"@type":"Question","name":"How do I create a custom trace with Firebase Performance Monitoring in Android?","acceptedAnswer":{"@type":"Answer","text":"Call Trace.create(String) with a trace name, then use the start() and stop() methods to bookmark the code you want to measure. A convenient pattern is an inline function like trace(name, block) that wraps Trace.create(name).trace(block), automatically starting and stopping the trace around the given code block and exposing the trace object for adding custom attributes and metrics. Teams instrumenting Android code paths track patterns like this on daily.dev."}}]}
```

