>- Integrate the Dynatrace Flutter Plugin into a Flutter project — dependency setup, config, SDK bootstrap, navigation tracking, and verification. "integrate Dynatrace Flutter", "mobile observability Flutter", "dynatrace_flutter_plugin". or Dynatrace server-side configuration.
npx skills add https://github.com/Dynatrace/dynatrace-for-ai --skill dt-obs-flutter
flutter available on PATHpubspec.yaml at the project rootapplicationId and beaconUrl, or to download dynatrace.config.yaml)dart CLI available (comes with Flutter SDK; used to run the plugin configuration script)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.
dynatrace.config.yamlBefore asking the user anything, check whether dynatrace.config.yaml exists at the project root.
applicationId and beaconUrl, and confirm they match the target environment. If correct, run the userOptIn check below and skip to Step 3.userOptIn check:
Inspect the file for userOptIn (Android) and DTXUserOptIn (iOS).
true, flag Step 7a. If false, skip Step 7a.true.dynatrace.config.yaml (only if Step 1 found no file)Ask the user which approach they prefer:
Option A — Download from console (recommended):
dynatrace.config.yaml and place it at the project root (same level as pubspec.yaml)Once the file is in place, apply the userOptIn check from Step 1 and flag Step 7a if needed.
Option B — Provide credentials manually:
Read references/config-yaml.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 7a if needed.
Read pubspec.yaml first.
flutter pub add dynatrace_flutter_plugin
dependencies: No change — proceed to Step 4.dev_dependencies: Remove it from dev_dependencies, then run flutter pub add dynatrace_flutter_plugin. The plugin is required at runtime, including in release builds.If Step 3 ran flutter pub add, dependencies are already fetched — skip this step.
Otherwise run:
flutter pub get
Confirm success before continuing.
dart run dynatrace_flutter_plugin
This reads dynatrace.config.yaml and automatically configures Android Gradle and ios/Runner/Info.plist. No manual native file edits are needed.
Common mistakes to flag and correct:
flutter pub run dynatrace_flutter_plugin — wrong, use dart run dynatrace_flutter_pluginbuild.gradle / build.gradle.kts or Info.plist — not neededmain.dartRead lib/main.dart. Replace runApp(...) with Dynatrace().start(...):
import 'package:dynatrace_flutter_plugin/dynatrace_flutter_plugin.dart';
import 'package:flutter/material.dart';
void main() {
Dynatrace().start(const MyApp());
}
Dynatrace().start() calls runApp internally — remove any separate runApp callWidgetsFlutterBinding.ensureInitialized() is not required by Dynatrace before start(), but keep it if your app needs it for other pre-start initialization (for example, plugin or platform setup)await Dynatrace().start() itself; only use await for other app initialization that must complete before calling start()In the root MaterialApp or CupertinoApp, add DynatraceNavigationObserver() to navigatorObservers:
MaterialApp(
navigatorObservers: [DynatraceNavigationObserver()],
...
)
CupertinoApp(
navigatorObservers: [DynatraceNavigationObserver()],
...
)
userOptIn: true)Skip this step if userOptIn was not set to true during Steps 1 or 2.
Read references/user-opt-in.md for the full guidance on DataCollectionLevel, crashReportingOptedIn, and placement options. Ask the user the questions defined there, then apply the call to the relevant file.
Check pubspec.yaml for the http package dependency. Separately, search the codebase for import 'dart:io' and HttpClient usages. If either is present, apply instrumentation:
| Package | Instrumentation |
|---|---|
| http | Dynatrace().createHttpClient() — replace http.Client() at the construction site |
| dart:io HttpClient | Manual timing via Dynatrace().createWebRequestTiming(...) — no drop-in wrapper exists |
createHttpClient() accepts an optional client: parameter to wrap an existing client instance. Find every http.Client() construction site in the project and replace it with Dynatrace().createHttpClient().
If none are present, note it for when network calls are added.
Confirm to the user what is active:
Enabled by default (when userOptIn is false or absent):
> When userOptIn: true, all data collection — including crash reporting — is gated on the applyUserPrivacyOptions(...) call.
Configured during this setup:
Read references/verification.md and show the user the verification checklist. If no data appears after 5 minutes, work through the troubleshooting steps in that file.
references/config-yaml.md — Full dynatrace.config.yaml template with Grail and userOptIn conditional blocksreferences/user-opt-in.md — applyUserPrivacyOptions guidance, DataCollectionLevel options, placement optionsreferences/verification.md — Post-setup verification checklist and troubleshootingGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take dynatrace/dt-obs-flutter from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.