Skip to content

Accept Android 17 trace header keys - #2

Merged
jjbayer merged 1 commit into
getsentry:masterfrom
antonis:accept-android-17-header-keys
Oct 23, 2026
Merged

jjbayer merged 1 commit into
getsentry:masterfrom
antonis:accept-android-17-header-keys

Conversation

@antonis

@antonis antonis commented Oct 22, 2026

Copy link
Copy Markdown

Description

Starting with Android 17 (API 37), ART writes five additional keys in the *version section of every method trace, right after pid=: is_streaming, is_precise_trace, end_time, end_tsc and compilation-filter.

They come from TraceWriter::CreateSummary in runtime/trace.cc on android17-release. The same function on android16-release stops at pid=. They're written unconditionally, so parse() currently fails on every method trace recorded on Android 17.

Changes

  • parse_header_line now recognizes the five keys and validates their values: booleans for is_streaming and is_precise_trace, numbers for end_time and end_tsc, and any text up to the newline for compilation-filter. The values aren't stored, so AndroidTraceLog and the public API stay the same.
  • Other unknown keys, and malformed values for known keys, are still rejected as before.
  • Tests: unit tests for each new key, including rejected values, plus a full parse of a trace with the Android 17 header.

The rest of the format is unchanged in Android 17. Threads, methods, the SLOW header and the event records all parse as before once these lines are accepted.

Context

Same change as the upstream PR chayleaf#3 (same commit), opened here so Relay can use this fork until upstream accepts it. Fixes the root cause of getsentry/relay#6517.

It merges cleanly with #1, and all tests pass on the combined result.

@jjbayer
jjbayer merged commit 40643d6 into getsentry:master Oct 23, 2026
6 checks passed
@antonis

antonis commented Oct 23, 2026

Copy link
Copy Markdown
Author

Thank you @jjbayer 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants