dt-alerting
End-to-end Dynatrace alerting lifecycle — anomaly detector setup and model selection (static threshold, adaptive baseline,…
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
$ npx -y skills add Dynatrace/dynatrace-for-ai --skill dt-setup-react-native --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/dt-setup-react-nativeContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: dt-setup-react-native license: Apache-2.0 description: >- 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.
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.
Before asking the user anything, check whether `dynatrace.config.js` exists at the project root.
**`userOptIn` check:**
Inspect the file for `userOptIn` (Android block) and `DTXUserOptIn` (iOS block).
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. On the **Select capability and settings** screen, configure monitoring features (crash reporting, user action monitoring, etc.) 1. Download `dynatrace.config.js` and place it at the project root (same level as `package.json`)
Once the file is in place, apply the `userOptIn` check from Step 1 and flag Step 9 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 9 if needed.
Read `package.json` first.
npm install @dynatrace/react-native-plugin
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.
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).
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
],
};Common mistakes to flag and correct:
Read `babel.config.js` and determine which preset the project uses — this controls how the JSX runtime is registered.
If `babel-preset-expo` appears in `presets`, set `jsxImportSource` **on the preset itself**. Do not add a separate `@babel/plugin-transform-react-jsx` plugin — Expo's preset already owns the JSX transform, and stacking a second JSX plugin over it breaks the instrumentation.
module.export
Everything AI agents need to work with Dynatrace, starting with skills. Skills are portable knowledge packages following the Agent Skills open format. They give AI coding agents the domain-specific context to query, analyze, and interpret Dynatrace data.
End-to-end Dynatrace alerting lifecycle — anomaly detector setup and model selection (static threshold, adaptive baseline,…
Work with Dynatrace dashboards - create, modify, query, and analyze dashboard JSON including tiles, layouts, DQL queries,…
Work with Dynatrace notebooks - create, modify, query, and analyze notebook JSON including sections, DQL queries, and…
Core DQL syntax, pitfalls, query patterns, and query optimization. Load to write, build, fix, or OPTIMIZE a DQL query — prevents…
Dynatrace server-side JS runtime — function contract, runtime limits, Web APIs, Node.js modules, fetch with credential vault, and…
Migrate Dynatrace classic and Gen2 entity-based DQL to Smartscape equivalents. Covers three scenarios. (1) mass data queries…