dt-setup-react-native
БесплатноБез исполняемых скриптовНе проверенIntegrate the Dynatrace React Native Plugin and Session Replay into a React Native or Expo project — dependency setup, dynatrace.config.js, Babel…
от Dynatrace★ 190 звёзд на GitHubОб этом скилле
Dynatrace React Native Plugin Integration Skill
Prerequisites
- Node.js 16.0+ and npm available on
PATH - An existing React Native project (v0.62+, React 16.11+) or Expo project (v44+) with a
package.jsonat the project root android/andios/platform folders present (Expo managed workflow requiresnpx expo prebuildfirst)- Android: minSdk 23+, Android Gradle plugin and Gradle 8.1.1+, Java 17, Kotlin 2.0.21 — see the plugin README's Kotlin compatibility note if the build fails on Kotlin metadata
- iOS: deployment target 15+
- A Dynatrace environment with access to Experience Vitals (to obtain
applicationIdandbeaconUrl, or to downloaddynatrace.config.js) - Console access to Experience Vitals → Mobile to configure app settings (Data Privacy, Enablement and Cost Control)
- macOS with CocoaPods for iOS builds
Work through the steps below in order, interacting with the user at each decision point. Read actual project files before suggesting changes — do not assume the current state.
Step 1 — Check for existing dynatrace.config.js
Before asking the user anything, check whether dynatrace.config.js exists at the project root.
- File exists: Read it, show the
applicationIdandbeaconUrl, and confirm they match the target environment (with manual startup,autoStart: false, they are intentionally absent — see Step 7a). If correct, run theuserOptIncheck below and skip to Step 3 (config is already present — Step 2 is not needed). A config downloaded from the console ships withreact.debug: trueandDTXLogLevelALL— mention that debug logging should be removed before a production build. - File does not exist: Proceed to Step 2.
userOptIn check:
Inspect the file for userOptIn (Android block) and DTXUserOptIn (iOS block).
- Present on both platforms: Trust the value as-is. If
true, flag Step 10. Iffalse, skip Step 10 unless the user later chooses Session Replay in Step 9, which requires switching opt-in on. - Absent from either platform: Ask the user: "Do you have User Opt-In mode enabled or disabled?" (If unsure: Experience Vitals → Mobile → [Your App] → Settings → Data Privacy.) Add the missing value to the relevant platform(s), then flag Step 10 if the final value is
true.
Step 2 — Obtain dynatrace.config.js (only if Step 1 found no file)
Ask the user which approach they prefer:
Option A — Download from console (recommended):
- Open their Dynatrace environment
- Navigate to: Experience Vitals → New Frontend → Mobile
- Enter app name and choose React Native as the platform
- On the Select capability and settings screen, configure monitoring features (crash reporting, user action monitoring, Session Replay, etc.). These settings can be changed later via Experience Vitals → [App] → Settings → Enablement and Cost Control.
- Download
dynatrace.config.jsand place it at the project root (same level aspackage.json)
Once the file is in place, apply the userOptIn check from Step 1 and flag Step 10 if needed.
Option B — Provide credentials manually:
Read references/config-js.md for the full template and conditional blocks. Collect all required values from the user before creating any files, then apply the userOptIn check and flag Step 10 if needed.
Step 3 — Install the plugin
Read package.json first.
- Not present: Run:
npm install @dynatrace/react-native-plugin - Already under
dependencies: No change needed. - Under
devDependencies: Remove it and runnpm install @dynatrace/react-native-plugin. The plugin is required at runtime including in release builds.
Note: npm install alphabetically sorts the dependencies object in package.json. Existing entries may appear reordered after this step — this is expected npm behavior, not an error.
Step 4 — Install iOS pods (macOS only)
If on macOS and targeting iOS, run:
cd ios && pod install && cd ..
Confirm success before continuing. CocoaPods must be installed (gem install cocoapods if missing). If the Session Replay package is added later (Step 9), run pod install again.
Step 5 — Register Babel plugin in babel.config.js
Read babel.config.js. Append BabelPluginDynatrace to the plugins array, just before react-native-reanimated/plugin if that plugin is present (reanimated must always be last):
module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: [
// ... existing plugins ...
'@dynatrace/react-native-plugin/instrumentation/BabelPluginDynatrace',
// react-native-reanimated/plugin goes here if present — must stay last
],
};
- If the plugins array already contains
'@dynatrace/react-native-plugin/instrumentation/BabelPluginDynatrace': skip this step. - If the project already configures
metro.config.jswithbabelTransformerPath: '@dynatrace/react-native-plugin/lib/dynatrace-transformer': that is the legacy Metr
Установить dt-setup-react-native в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл dt-setup-react-native?
Integrate the Dynatrace React Native Plugin and Session Replay into a React Native or Expo project — dependency setup, dynatrace.config.js, Babel registration, npx instrumentation, navigation tracking, Session Replay, user privacy options, and verification. Handles both bare React Native and Expo (babel-preset-expo) Babel configuration automatically. Trigger: "add Dynatrace to React Native", "React Native plugin setup", "instrument React Native app", "integrate Dynatrace RN", "mobile observability React Native", "react-native-plugin", "dynatrace react native", "add Dynatrace to Expo", "instrument Expo app", "Dynatrace Expo setup", "React Native session replay", "react-native-session-replay", "enable session replay in React Native". Do NOT use for: querying RN RUM data (use dt-obs-frontends), non-React Native mobile setups, or Dynatrace server-side configuration.
Как установить скилл dt-setup-react-native?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dt-setup-react-native запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic