<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/trace-me-if-you-can-automated-instrumentation-and-field-profiling-ycberuwh4" -->

---
title: Trace me if you can: Automated instrumentation and field...
description: Android's new Tracing 2.0 library replaces the 14-year-old Tracing 1.0 API with higher performance and richer features. It removes the old 128-character label...
canonical: https://daily.dev/posts/trace-me-if-you-can-automated-instrumentation-and-field-profiling-ycberuwh4
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Trace me if you can: Automated instrumentation and field profiling | daily.dev
og:description: Android's new Tracing 2.0 library replaces the 14-year-old Tracing 1.0 API with higher performance and richer features. It removes the old 128-character label...
og:url: https://daily.dev/posts/trace-me-if-you-can-automated-instrumentation-and-field-profiling-ycberuwh4
og:image: https://api.daily.dev/og/posts/YcbErUwH4.png
og:image:alt: Trace me if you can: Automated instrumentation and field profiling
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.

# Trace me if you can: Automated instrumentation and field profiling

**[Android Developers](https://daily.dev/sources/androiddevelopers)** · 28 min read · 0 upvotes · 0 comments

## Summary

Android's new Tracing 2.0 library replaces the 14-year-old Tracing 1.0 API with higher performance and richer features. It removes the old 128-character label limit, supports pluggable trace backends instead of only the system ATrace buffer, and runs about 7 times faster than before. It adds Kotlin coroutine context propagation across threads and custom metadata. Compose 1.13 ships recomposition tracing built on these features. Using tracing-based insights, Wise improved app startup by 45%, and R8 and Metalava got 25% and 15% faster respectively. The current stable version is androidx.tracing 2.0.5, supporting both JVM and Android.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=eZtQgeIrmAo>

## Questions this post answers

### What is the character limit for trace section labels in Android Tracing 2.0 compared to the old androidx.tracing API?

Tracing 2.0 removes the 128-character label limit that existed in Tracing 1.0. The old limit, introduced with Android Jelly Bean in 2012, truncated long trace names and added extra overhead from the truncation itself. Tracing 2.0 also lets you attach arbitrary custom metadata to a trace section instead of relying only on the name.

_Developers debugging truncated trace labels can track API changes like this one on daily.dev._

### How much faster is the new Android Tracing 2.0 library compared to the original androidx tracing 1.0 API?

Tracing 2.0 is about 7 times faster than Tracing 1.0. On a Pixel 6a running Android 16, a single begin and end trace section took around 1,200 nanoseconds with the old API; the new purpose-built library cuts that overhead significantly, freeing up time otherwise spent on rendering frames in hot code paths.

_Teams chasing frame-rendering overhead can follow performance benchmarks like this on daily.dev._

### Does Kotlin coroutine context propagation work automatically with Android Tracing 2.0?

Yes, Kotlin coroutine context propagation is fully supported out of the box in Tracing 2.0 with no extra setup required. Using the trace coroutine API, a trace shows causal arrows across thread switches, for example when a suspend function like fetch profile moves work from one worker thread to another during deserialization, making it clear which call caused which context switch.

_Developers tracing coroutine thread hops can follow Android tooling updates like this on daily.dev._

## Similar posts on daily.dev

- [JetBrains unveils AI tracing library for Kotlin and Java](https://daily.dev/posts/jetbrains-unveils-ai-tracing-library-for-kotlin-and-java-40emjroec) · InfoWorld · 3 upvotes · 0 comments
- [Tracing Business Operations, Not HTTP Calls — Part 2](https://daily.dev/posts/tracing-business-operations-not-http-calls-part-2-bbtkmqdmy) · ProAndroidDev · 6 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
- [Flutter SDK 10.0: Streaming Traces, Better Crash Rates](https://daily.dev/posts/flutter-sdk-10-0-streaming-traces-better-crash-rates-uldnxtikr) · Sentry Engineering · 0 upvotes · 0 comments
- [Introducing Tracy: The AI Observability Library for Kotlin](https://daily.dev/posts/introducing-tracy-the-ai-observability-library-for-kotlin-q47hey4k8) · JetBrains · 1 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/trace-me-if-you-can-automated-instrumentation-and-field-profiling-ycberuwh4)

```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":"Trace me if you can: Automated instrumentation and field profiling","url":"https://daily.dev/posts/trace-me-if-you-can-automated-instrumentation-and-field-profiling-ycberuwh4","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/trace-me-if-you-can-automated-instrumentation-and-field-profiling-ycberuwh4"},"datePublished":"2026-10-29T22:58:06.494Z","dateModified":"2026-10-29T22:58:36.118Z","description":"Android's new Tracing 2.0 library replaces the 14-year-old Tracing 1.0 API with higher performance and richer features. It removes the old 128-character label...","image":"https://i.ytimg.com/vi/eZtQgeIrmAo/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/eZtQgeIrmAo/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Android Developers","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":"Android Developers","logo":"https://media.daily.dev/image/upload/s--VHoSw1TN--/f_auto/v1722583834/logos/androiddevelopers","url":"https://daily.dev/sources/androiddevelopers"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/trace-me-if-you-can-automated-instrumentation-and-field-profiling-ycberuwh4","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"performance,android,kotlin,jetpack-compose","timeRequired":"PT28M","video":{"@type":"VideoObject","name":"Trace me if you can: Automated instrumentation and field profiling","description":"Android's new Tracing 2.0 library replaces the 14-year-old Tracing 1.0 API with higher performance and richer features. It removes the old 128-character label...","thumbnailUrl":"https://i.ytimg.com/vi/eZtQgeIrmAo/sddefault.jpg","uploadDate":"2026-10-29T22:58:06.494Z","duration":"PT28M","url":"https://api.daily.dev/r/YcbErUwH4","embedUrl":"https://www.youtube.com/embed/eZtQgeIrmAo"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Android Developers","item":"https://daily.dev/sources/androiddevelopers"},{"@type":"ListItem","position":3,"name":"Trace me if you can: Automated instrumentation and field profiling"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/trace-me-if-you-can-automated-instrumentation-and-field-profiling-ycberuwh4#faq","mainEntity":[{"@type":"Question","name":"What is the character limit for trace section labels in Android Tracing 2.0 compared to the old androidx.tracing API?","acceptedAnswer":{"@type":"Answer","text":"Tracing 2.0 removes the 128-character label limit that existed in Tracing 1.0. The old limit, introduced with Android Jelly Bean in 2012, truncated long trace names and added extra overhead from the truncation itself. Tracing 2.0 also lets you attach arbitrary custom metadata to a trace section instead of relying only on the name. Developers debugging truncated trace labels can track API changes like this one on daily.dev."}},{"@type":"Question","name":"How much faster is the new Android Tracing 2.0 library compared to the original androidx tracing 1.0 API?","acceptedAnswer":{"@type":"Answer","text":"Tracing 2.0 is about 7 times faster than Tracing 1.0. On a Pixel 6a running Android 16, a single begin and end trace section took around 1,200 nanoseconds with the old API; the new purpose-built library cuts that overhead significantly, freeing up time otherwise spent on rendering frames in hot code paths. Teams chasing frame-rendering overhead can follow performance benchmarks like this on daily.dev."}},{"@type":"Question","name":"Does Kotlin coroutine context propagation work automatically with Android Tracing 2.0?","acceptedAnswer":{"@type":"Answer","text":"Yes, Kotlin coroutine context propagation is fully supported out of the box in Tracing 2.0 with no extra setup required. Using the trace coroutine API, a trace shows causal arrows across thread switches, for example when a suspend function like fetch profile moves work from one worker thread to another during deserialization, making it clear which call caused which context switch. Developers tracing coroutine thread hops can follow Android tooling updates like this on daily.dev."}}]}
```

