Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Expose Android app startup Activity filtering in the React Native SDK

オープン
#1,485 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@sbarrio がすでに取り組んでいます。

2026年10月9日 から。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
kotlin, react-native, typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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...
}
主要言語
TypeScript
スター
145
フォーク
65
平均マージ
2日 19時間
マージ済み PR(30日)
21

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DataDog/dd-sdk-reactnative のほかの issue

DataDog/dd-sdk-reactnative の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。