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.
🤖 This preview updates automatically when you update the PR. |
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
Updated the changelog to reflect the use of sentry-java's getFramesDelay API and removed duplicate entry.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📲 Install BuildsAndroid
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6b4adee. Configure here.
Tests cover: null collector, valid delay result, negative delay result, future timestamps, and zero delay with no slow frames. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ceeds Prevents getFramesDelay() from being called without an active listener when startCollection() returns null. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.💚 How did you test it?
CI, Manual
📝 Checklist
sendDefaultPIIis enabled🔮 Next steps