Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Expose Android app startup Activity filtering in the React Native SDK

Aperta
#1,485 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@sbarrio ci sta già lavorando.

Dal 9/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
kotlin, react-native, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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...
}
Lingua principale
TypeScript
Stelle
145
Fork
65
Merge medio
2g 16h
PR unite (30g)
20

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DataDog/dd-sdk-reactnative

Tutte le issue di DataDog/dd-sdk-reactnative

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.