Expose Android app startup Activity filtering in the React Native SDK
Maintainers usually reply within 3 days
@sbarrio is already working on this.
Since Oct 9, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- kotlin, react-native, typescript
- Domain
- mobile, observability
Research direction
Start with the workaround in the issue, which overrides buildRumConfiguration() in DdSdkNativeInitialization and calls setAppStartupActivityPredicate on the Android RumConfiguration.Builder. Trace how a TypeScript RUM option would travel through the native bridge into DdSdkConfiguration, and decide whether the field is optional with the current behavior kept as the default. Done means a new androidAppStartupActivityClassNames option that filters startup Activities on Android, with the default unchanged and tests covering both cases.
Written by the indexing model from the issue text.
Description
Feature description
Use case
Android apps can contain secondary Activities that do not represent an app startup. Datadog may treat these Activities as warm starts. We observed time_to_initial_display warm-start vitals lasting up to 58 seconds while the user was already navigating and interacting with the app. These invalid measurements significantly inflate Android startup SLOs.
How the SDK currently delivers
@datadog/[email protected] uses [email protected], which supports RumConfiguration.Builder.setAppStartupActivityPredicate.
However, the React Native SDK does not expose a way to configure that predicate. React Native consumers therefore cannot distinguish their primary React Activity from authentication or other auxiliary Activities without patching the package’s native initialization code.
What we would like to see
Expose an Android-specific React Native configuration option that limits app startup tracking to selected Activity class names:
configuration.androidAppStartupActivityClassNames = [
'com.example.MainActivity'
];
When unspecified, the SDK could preserve its current behavior for backward compatibility.
Proposed solution
The React Native SDK could:
- Add
androidAppStartupActivityClassNames?: string[]to its RUM configuration. - Serialize it through the native configuration bridge.
- Parse it in the Android
DdSdkConfiguration. - Apply it while constructing
RumConfiguration:
configuredActivityClassNames?.let { classNames ->
configBuilder.setAppStartupActivityPredicate { activity ->
activity.javaClass.name in classNames
}
}
An alternative would be an Android-native extension point that applications can use to customize RumConfiguration.Builder before RUM initialization.
Other relevant information
Our current workaround patches DdSdkNativeInitialization.buildRumConfiguration():
private const val APP_STARTUP_ACTIVITY_CLASS_NAME =
"com.example.MainActivity"
@OptIn(ExperimentalRumApi::class)
private fun buildRumConfiguration(
configuration: DdSdkConfiguration
): RumConfiguration {
// Existing configuration...
configBuilder.setAppStartupActivityPredicate { activity ->
activity.javaClass.name == APP_STARTUP_ACTIVITY_CLASS_NAME
}
// Existing configuration...
}
- Dominant language
- TypeScript
- Stars
- 145
- Forks
- 65
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 21
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DataDog/dd-sdk-reactnative
-
GraphQL variables with non-ASCII contents will make Apollo Client request throw errorPossibly taken @cdn34dd claimed this 4 days ago. Openawaiting response bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
DataDog/dd-sdk-reactnative#1482 · 2 comments · 1 reaction · 1 assignee ·
Maintainers usually reply within 3 days
-
Interaction tracking records nothing: the babel plugin's injected import makes Metro bundle a second copy of the SDK, so DdBabelInteractionTracking.config is set on a different class than instrumented handlers callPossibly taken @cdn34dd claimed this 2 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
DataDog/dd-sdk-reactnative#1377 · 1 comment · 1 reaction · 1 assignee ·
Maintainers usually reply within 3 days
-
Babel plugin emits untransformed JSX when a tracked component has .map() children, breaking the Hermes buildPossibly taken @cdn34dd claimed this 2 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 76/100
DataDog/dd-sdk-reactnative#1353 · 1 comment · 1 assignee ·
Maintainers usually reply within 3 days
-
iOS: network error events from JS-tracked requests bypass the drop_resource deduplication and cannot be filtered — expose a native error mapper?Possibly taken @marco-saia-datadog claimed this 2 days ago. Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 58/100
DataDog/dd-sdk-reactnative#1338 · 2 comments · 1 assignee ·
Maintainers usually reply within 3 days
-
Feature Request: Sanitize Auto-Tracked Resource URLs Before ReportingPossibly taken @marco-saia-datadog claimed this 2 days ago. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 52/100
DataDog/dd-sdk-reactnative#1327 · 1 assignee ·
Maintainers usually reply within 3 days
All issues in DataDog/dd-sdk-reactnative
Similar issues
-
bug cli service
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
generated-by-ai
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
umbraco/Umbraco-CMS-MCP-Editor#208 · 1 comment ·
Maintainers usually reply within 1 day
-
Table: Space fires onActivate in single-selection mode — the reference doc and the JSDoc disagreeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sidorares/react-x11-components#764 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
backnotprop/plannotator#1840 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JoviDeCroock/pracht#432 ·
Maintainers usually reply within 1 day