MCPInstall

dt-setup-flutter

Integrate the Dynatrace Flutter Plugin into a Flutter project — dependency setup, config, SDK bootstrap, navigation tracking, and verification. Trigger: "add Dynatrace to Flutter", "Flutter plugin setup", "instrument Flutter app", "integrate Dynatrace Flutter", "mobile observability Flutter", "dynatraceflutterplugin". Do NOT use for: querying Flutter RUM data (use dt-obs-frontends), non-Flutter mobile setups, or Dynatrace server-side configuration.

Installs
863
Last 24h
+12
Trending rank
#7806
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/dynatrace/dynatrace-for-ai --skill dt-setup-flutter
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads dt-setup-flutter automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Dynatrace Flutter Plugin Integration Skill

Prerequisites

  • Flutter SDK installed and flutter available on PATH
  • An existing Flutter project with a pubspec.yaml at the project root
  • A Dynatrace environment with access to Experience Vitals (to obtain applicationId and beaconUrl, or to download dynatrace.config.yaml)
  • Console access to Experience Vitals → Mobile to configure app settings (Data Privacy, Enablement and Cost Control)
  • 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.

Step 1 — Check for existing dynatrace.config.yaml

Before asking the user anything, check whether dynatrace.config.yaml 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.
  • File does not exist: Proceed to Step 2.

userOptIn check:

Inspect the file for userOptIn (Android) and DTXUserOptIn (iOS).

  • Present on both platforms: Trust the value as-is. If true, flag Step 7a. If false, skip Step 7a.
  • 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 7a if the final value is true.

Step 2 — Obtain dynatrace.config.yaml (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
  2. Navigate to: Experience Vitals → New Frontend → Mobile
  3. Enter app name and choose Flutter as the platform
  4. On the Select capability and settings screen, configure monitoring features (Crash reporting, user action monitoring, etc.). User action monitoring can be changed later via Experience Vitals → [App] → Settings → Enablement and Cost Control.
  5. Download 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.

Step 3 — Add the dependency

Read pubspec.yaml first.

  • Not present: Run:
    flutter pub add dynatrace_flutter_plugin
    
  • Already under dependencies: No change — proceed to Step 4.
  • Under 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.

Step 4 — Fetch dependencies

If Step 3 ran flutter pub add, dependencies are already fetched — skip this step.

Otherwise run:

flutter pub get

Confirm success before continuing.

Step 5 — Run the Dynatrace configuration script

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_plugin
  • Manual edits to build.gradle / build.gradle.kts or Info.plist — not needed

Step 6 — Bootstrap the SDK in main.dart

Read 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 call
  • WidgetsFlutterBinding.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)
  • Do not await Dynatrace().start() itself; only use await for other app initialization that must complete before calling start()

Step 7 — Add navigation tracking

In the root MaterialApp or CupertinoApp, add DynatraceNavigationObserver() to navigatorObservers:

MaterialApp(
  navigatorObservers: [DynatraceNavigationObserver()],
  ...
)
CupertinoApp(
  navigatorObservers: [DynatraceNavigationObserver()],
  ...
)

Step 7a — Privacy options call (only if 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.

Step 8 — HTTP instrumentation (if applicable)

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:

PackageInstrumentation
httpDynatrace().createHttpClient() — replace http.Client() at the construction site
dart:io HttpClientManual 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.

Step 9 — Post-setup summary

Confirm to the user what is active:

Enabled by default (when userOptIn is false or absent):

  • ✅ Crash reporting
  • ✅ User action tracking
  • ✅ Network monitoring
  • ✅ Lifecycle monitoring
  • ✅ Auto-start

When userOptIn: true, all data collection — including crash reporting — is gated on the applyUserPrivacyOptions(...) call.

Configured during this setup:

  • Privacy mode: [userOptIn: true — consent call added / opt-out (SDK default)]
  • Navigation tracking: [DynatraceNavigationObserver added]
  • HTTP instrumentation: [applied / not applicable yet]

Step 10 — Verification

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.

Reference Files

  • references/config-yaml.md — Full dynatrace.config.yaml template with Grail and userOptIn conditional blocks
  • references/user-opt-in.md — applyUserPrivacyOptions guidance, DataCollectionLevel options, placement options
  • references/verification.md — Post-setup verification checklist and troubleshooting

External References

FAQ

What does the dt-setup-flutter skill do?

Integrate the Dynatrace Flutter Plugin into a Flutter project — dependency setup, config, SDK bootstrap, navigation tracking, and verification. Trigger: "add Dynatrace to Flutter", "Flutter plugin setup", "instrument Flutter app", "integrate Dynatrace Flutter", "mobile observability Flutter", "dynatraceflutterplugin". Do NOT use for: querying Flutter RUM data (use dt-obs-frontends), non-Flutter mobile setups, or Dynatrace server-side configuration.

How do I install dt-setup-flutter?

Run npx skills add https://github.com/dynatrace/dynatrace-for-ai --skill dt-setup-flutter in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/dt-setup-flutter/ (personal) or .claude/skills/dt-setup-flutter/ (project).

Which AI agents can use dt-setup-flutter?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is dt-setup-flutter safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains dt-setup-flutter?

It is published by dynatrace in dynatrace/dynatrace-for-ai. It has 863 recorded installs.

More from dynatrace/dynatrace-for-ai

View all →

dt-dql-essentials

dynatrace/dynatrace-for-ai

Core DQL syntax, pitfalls, query patterns, and query optimization. Load to write, build, fix, or OPTIMIZE a DQL query — prevents syntax errors and makes queries faster, more efficient, and cheaper (less data scanned = lower query consumption/cost per run). Covers fetch commands, data models, field namespaces, time alignment, entity/smartscape patterns, metric discovery, and performance/cost optimization (filter early, bucket filters, short time ranges, field selection, sampling, cardinality). Trigger: "write/build/fix a DQL query", "DQL syntax", "query logs/spans/metrics", "create a timeseries", "optimize my DQL", "make my query faster/cheaper", "reduce DQL cost/consumption/scanned data", "keep DQL cost under control". Do NOT use to explain an existing query or answer product questions. For MONITORING a tenant's ACTUAL query consumption/billing (how much queries cost, who scanned most, cost trends) use dt-platform-costs — this tunes the query text, not billing data.

DevOps & Cloud2.8K installs

dt-app-dashboards

dynatrace/dynatrace-for-ai

Work with Dynatrace dashboards - create, modify, query, and analyze dashboard JSON including tiles, layouts, DQL queries, variables, and visualizations.

Data & Databases2.8K installs

dt-obs-logs

dynatrace/dynatrace-for-ai

Log querying, filtering, pattern analysis, and error rate calculation. Use when searching application or infrastructure logs, analyzing error patterns, or correlating log data. Trigger: "show error logs", "search logs for keyword", "log error rate", "recent errors", "logs from last hour", "find log entries", "top error messages", "log patterns", "parse JSON logs", "logs by process group", "log trends over time", "log entry counts per minute". Do NOT use for explaining existing queries, product documentation questions, distributed tracing or span analysis (use dt-obs-tracing).

DevOps & Cloud2.7K installs

dt-obs-problems

dynatrace/dynatrace-for-ai

DAVIS problem analysis including root cause identification, impact assessment, and correlation with other telemetry. Use when querying or investigating detected problems. Trigger: "active problems", "root cause analysis", "problem impact", "affected users", "list problems", "P-12345 details", "recurring problems", "problem history", "problem trending", "blast radius", "which entity caused the problem", "problems affecting Kubernetes", "problems by service". Do NOT use for explaining existing queries, product documentation questions, generic log searching, distributed tracing, or host-level resource monitoring.

DevOps & Cloud2.7K installs

dt-app-notebooks

dynatrace/dynatrace-for-ai

Work with Dynatrace notebooks - create, modify, query, and analyze notebook JSON including sections, DQL queries, and visualizations.

2.7K installs

dt-obs-tracing

dynatrace/dynatrace-for-ai

Distributed traces, spans, service dependencies, and request flow analysis. Use when investigating span-level details, failures, performance bottlenecks, or trace correlation. Trigger: "trace analysis", "slow requests", "failed spans", "service dependencies", "distributed trace", "span details", "HTTP status codes in traces", "database query spans", "messaging spans", "gRPC calls", "Lambda cold starts", "trace ID lookup", "exception analysis", "correlate logs and traces", "request attributes". Do NOT use for explaining existing queries, product documentation or configuration questions, service-level RED metrics (use dt-obs-services), log searching (use dt-obs-logs), or problem analysis (use dt-obs-problems).

Backend & APIs2.6K installs

Popular mobile skills

View category →

design-mobile-apps

designed-by-ai/skills

Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.

Mobile1.1M installs

ios-design

uizze.sh

Design and review iOS UI/UX for iPhone apps in SwiftUI, UIKit, or React Native. Use for mobile app design, screen redesigns, navigation flows, typography, forms, keyboard and safe-area layout, and accessibility checks. Apply Apple Human Interface Guidelines and consult real product references through the optional Uizze connection.

Mobile416.5K installs

vercel-react-native-skills

vercel-labs/agent-skills

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.

OfficialMobile256.7K installs

animate-expo

emilkowalski/skills

Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use animate.

Mobile140.1K installs

xcode-project-setup

firebase/agent-skills

Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).

OfficialMobile131.2K installs

firebase-remote-config-basics

firebase/agent-skills

Manages Firebase Remote Config templates, feature flags, loading strategies, and SDKs (Android, iOS). Use when downloading/deploying remoteconfig JSON templates, managing version history/feature flags, setting in-app defaults, fetchAndActivate(), real-time listeners, or SDK setup. Don't use for Firebase Hosting, Auth, Firestore, Data Connect, Crashlytics, or App Hosting.

OfficialMobile121.7K installs