Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Expose Android app startup Activity filtering in the React Native SDK

Open
#1,485 1 comment 0 reactions 1 assignee View on GitHub

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

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

enhancement
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:

  1. Add androidAppStartupActivityClassNames?: string[] to its RUM configuration.
  2. Serialize it through the native configuration bridge.
  3. Parse it in the Android DdSdkConfiguration.
  4. 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DataDog/dd-sdk-reactnative

All issues in DataDog/dd-sdk-reactnative

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.