Repository navigation
Conversation
…nown to Relay Reference experiment for a Relay issue. Android 17 (API 37) ART method traces add header lines (is_streaming, is_precise_trace, end_time, end_tsc, compilation-filter) that Relay's android_trace_log 0.3.0 parser rejects, so Android 17 transaction profiles are dropped as profiling_invalid_sampled_profile. Removing only those lines before upload makes the profiles ingest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
Plus 2 more 🤖 This preview updates automatically when you update the PR. |
Contributor
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- [DO NOT MERGE] Strip Android 17 trace header keys unknown to Relay ([#6892](https://github.com/getsentry/sentry-react-native/pull/6892))If none of the above apply, you can opt out of this check by adding |
antonis
commented
Oct 15, 2026
antonis
left a comment
Contributor
Author
There was a problem hiding this comment.
Closing as it served the purpose of testing
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.
Caution
Do not merge. This is a reference experiment for a Relay issue, not a fix we intend to ship. The proper fix belongs in Relay.
📢 Type of change
📜 Description
Transaction profiles recorded on Android 17 (API 37) are dropped at ingestion with outcome
invalid/profiling_invalid_sampled_profile. The same build on Android 16 (API 36) is accepted. In Stats this shows as "Invalid · Internal", becausegetReasonGroupName.tsgroups everyprofiling_*reason under "Internal".Cause: Android 17's ART method trace (
Debug.startMethodTracingSampling) adds new header lines to the*versionsection:Relay decodes
sampled_profilewithandroid_trace_log0.3.0 (relay-profiling/src/android/legacy.rs:138, andchunk.rs:100for trace chunks). That parser's header loop only accepts ten known keys and fails on the first unknown one.This PR: right before the trace is base64-encoded in
stopProfiling(), it dropskey=valuelines whose key is unknown to that parser. Only the*versionsection is touched; the input is returned unchanged when there's nothing to drop. Everything is prefixedTEMP.💡 Motivation and Context
Reference for the Relay issue: it proves that the new header keys are the only incompatibility, and that skipping unknown header keys is enough.
03d14df40eec40538c7b67de18d8fcb6, orgsentry-sdks, project5428561), where every Android 17 profile without it was rejected (33 on 2026-10-15).android_trace_loggrammar parses 15/15 Android 17 traces fully once unknown header keys are skipped: binary v3,event_size=14, dual clock, all events consumed, 0 trailing bytes.Suggested Relay fix: same transformation server-side, restricted to unknown keys so malformed known keys still fail as today. It's byte-identical for current traces, and it fixes all SDKs and already-shipped apps.
Related: #6891, whose Android CPU/memory measurements could only be verified on API ≤ 36 because of this.
💚 How did you test it?
profiling_invalid_sampled_profile(stats_v2?groupBy=reason).📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
🤖 Generated with Claude Code