[RUM-14275] Enable Jank Stats Tracking on Android#1124
Merged
Conversation
a9b1873 to
ce2a2ef
Compare
sbarrio
commented
Feb 5, 2026
| telemetrySampleRate: 100, | ||
| } | ||
| }, | ||
| logsConfiguration: {}, |
Contributor
Author
There was a problem hiding this comment.
These were missing from the example app.
| nativeInitialization.initialize(ddSdkConfiguration) | ||
|
|
||
| val activity = reactContext.currentActivity; | ||
| if (ddSdkConfiguration.rumConfiguration != null && activity != null) { |
There was a problem hiding this comment.
Just to better understand. Is it possible that Activity is actually null here? Or currentActivity is just nullable in ReactContext and in the real life we will never see null here?
Contributor
Author
There was a problem hiding this comment.
I don't think it's possible for the Activity to be null at this point, but as you mentioned, since it is nullable we need to be overly cautious.
Also, the first check is there to avoid enabling this if RUM is not enabled.
packages/core/android/src/main/kotlin/com/datadog/reactnative/DdSdkImplementation.kt
Outdated
Show resolved
Hide resolved
ce2a2ef to
022c4da
Compare
aleksandr-gringauz
approved these changes
Feb 6, 2026
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.
What does this PR do?
refresh_rate_averagewas not being reported on Android apps.On React Native, by the time the SDK initializes and registers lifecycle callbacks, the initial Activity has already passed through onCreate() and onStart(). The native SDK's FrameStatesAggregator never receives onActivityStarted() for this activity, so JankStats is never initialized for the main window, and
@view.refresh_rate_averageis never collected.Motivation
Metrics should be properly reported.
Additional Notes
Before

After

Review checklist (to be filled by reviewers)