perf(android): Replace RNSentryFrameDelayCollector with sentry-java getFramesDelay API#6074
Draft
perf(android): Replace RNSentryFrameDelayCollector with sentry-java getFramesDelay API#6074
Conversation
…etFramesDelay API Uses the new queryable `SentryFrameMetricsCollector.getFramesDelay()` API from sentry-java (getsentry/sentry-java#5248, commit 61659b6) instead of maintaining a custom listener-based collector. Closes #5908 Co-Authored-By: Claude Opus 4.6 <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 4 more 🤖 This preview updates automatically when you update the PR. |
Contributor
antonis
commented
Apr 30, 2026
Contributor
Author
antonis
left a comment
There was a problem hiding this comment.
Marking as blocked till an Android bump containing the changes in getsentry/sentry-java#5248 is shipped
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.
📢 Type of change
📜 Description
Replaces the custom
RNSentryFrameDelayCollector(listener-based frame delay collector) with a direct call to the newSentryFrameMetricsCollector.getFramesDelay()API added in sentry-java#5248 (commit61659b6).Changes:
RNSentryFrameDelayCollector.java(~130 lines) — no longer neededfetchNativeFramesDelay()to callcollector.getFramesDelay(startNanos, endNanos)directlystopFrameMetricsCollection()helper for clean lifecycle management💡 Motivation and Context
Closes #5908
The previous implementation in #5907 duplicated work already done internally by sentry-java:
With sentry-java now exposing a queryable API (mirroring iOS's
getFramesDelaySPI), we can eliminate all of this overhead.This PR requires
sentry-android>= next release (> 8.40.0) which includes thegetFramesDelay()API andSentryFramesDelayResultclass. It will not compile against the current 8.40.0 dependency.💚 How did you test it?
yarn test— 1187 tests)📝 Checklist
sendDefaultPIIis enabled🔮 Next steps
sentry-androiddependency to the release containinggetFramesDelay()API