Agent skill · dynatrace
dt-setup-react-native
Integrate the Dynatrace React Native Plugin into a React Native or Expo project — dependency setup, dynatrace.config.js, Babel registration, npx instrumentation, navigation tracking, 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". Do NOT use for: querying RN RUM data (use dt-obs-frontends), non-React Native mobile setups, or Dynatrace server-side configuration.
What it needs
About 7k tokens when loaded.
What this skill does
Dynatrace React Native Plugin Integration Skill Prerequisites Node.js 16.0+ and npm available on PATH An existing React Native project (v0.68+) or Expo project (v45+) with a package.json at the project root android/ and ios/ platform folders present (Expo managed workflow requires npx expo prebuild first) A Dynatrace environment with access to Experience Vitals (to obtain applicationId and beaconUrl, or to download dynatrace.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 applicationId and beaconUrl, and confirm they match the target environment. If correct, run the userOptIn check below and skip to Step 3 (config is already present — Step 2 is not needed). 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 9. If false, skip Step 9. 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 9 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): 1. Open their Dynatrace environment 1. Navigate to: Experience Vitals → New Frontend → Mobile 1. Enter app name and choose React Native as the platform 1. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills dynatrace/dt-setup-react-native