Repository navigation
feat(runtime-tracing): support Android and release 0.1.0-ALPHA02 - #171
Merged
Merged
Conversation
Turn :runtime-tracing-jvm into the Kotlin Multiplatform module :runtime-tracing (JVM + Android), published as structured-coroutines-runtime-tracing. PerfettoTraceSink now works on Android with an androidx.tracing Tracer, adding slice arguments and span flows that AndroidTraceSink cannot express. PerfettoTraceSession stays JVM-only. Add an instrumented test verified on an Android 15 emulator, document the Android setup and its caveats, and bump RUNTIME_VERSION to 0.1.0-ALPHA02. Relates to #170
santimattius
force-pushed
the
feat/runtime-tracing-android-170
branch
from
November 2, 2026 22:01
b68057d to
670cbad
Compare
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #170:
PerfettoTraceSinknow works on Android, adding slice arguments (queue_delay_ns,span_name,span_id, ...) and span flows thatAndroidTraceSink(android.os.Trace) cannot express. Also bumps the runtime family to0.1.0-ALPHA02.:runtime-tracing-jvmbecomes:runtime-tracing, a KMP module (JVM + Android), published asstructured-coroutines-runtime-tracing. The package and public JVM API are unchanged (API dump identical).PerfettoTraceSinklives injvmAndAndroidMain: it only needs anandroidx.tracing.Tracer.PerfettoTraceSessionstays JVM-only.connectedAndroidDeviceTest) that records with the AndroidTraceDriverand decodes the file: slices, args and flows.RUNTIME_VERSION=0.1.0-ALPHA02, install snippets updated.Things to know
0.1.0-ALPHA01(...-tracing-jvm->...-tracing). Acceptable on the 0.x line; documented in the CHANGELOG.androidx.tracing's in-process buffer, not the system trace buffer. With the defaultisCategoryEnabledthe Android driver records only while a system trace is active; use{ true }to always record (found on the emulator, documented).AndroidTraceSink) and docs: use runtime 0.1.0-ALPHA01 in install snippets #166 (install snippets, superseded here by0.1.0-ALPHA02). Whichever merges second needs a trivial rebase.Test plan
./gradlew :runtime-tracing:jvmTest :runtime-tracing:apiCheck :runtime-tracing:compileAndroidMain :runtime:jvmTest :runtime:apiCheck ./gradlew :runtime-tracing:connectedAndroidDeviceTest # Pixel 9 AVD, Android 15: passedNot validated: the publish workflow for the renamed artifact, and opening the Android file in the Perfetto UI.
Fixes #170