Expose Android app startup Activity filtering in the React Native SDK
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
- Ambito
- mobile, observability
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
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...
}
- Lingua principale
- TypeScript
- Stelle
- 145
- Fork
- 65
- Merge medio
- 2g 16h
- PR unite (30g)
- 20
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DataDog/dd-sdk-reactnative
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
DataDog/dd-sdk-reactnative#1486 ·
I maintainer di solito rispondono entro 2 giorni
-
GraphQL variables with non-ASCII contents will make Apollo Client request throw errorForse già presa @cdn34dd l’ha presa 5 giorni fa. Apertaawaiting response bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
DataDog/dd-sdk-reactnative#1482 · 2 commenti · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
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 callForse già presa @cdn34dd l’ha presa 3 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
DataDog/dd-sdk-reactnative#1377 · 1 commento · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Babel plugin emits untransformed JSX when a tracked component has .map() children, breaking the Hermes buildForse già presa @cdn34dd l’ha presa 3 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
DataDog/dd-sdk-reactnative#1353 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
iOS: network error events from JS-tracked requests bypass the drop_resource deduplication and cannot be filtered — expose a native error mapper?Forse già presa @marco-saia-datadog l’ha presa 3 giorni fa. Apertaenhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
DataDog/dd-sdk-reactnative#1338 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di DataDog/dd-sdk-reactnative
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
microsoft/playwright#43327 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/TypeScript#64758 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
opensearch-project/OpenSearch-Dashboards#12937 ·
I maintainer di solito rispondono entro 2 giorni
-
Liveness marks block-included attesters live in the block's epoch instead of the attestation's epochAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
a2ui-project/a2ui#3158 ·
I maintainer di solito rispondono entro 2 giorni