dt-setup-flutter
Skill161 starsChanged 3 months agoApache-2.0View on GitHub
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", "dynatrace_flutter_plugin". Do NOT use for: querying Flutter RUM data (use dt-obs-frontends), non-Flutter mobile setups, or Dynatrace server-side configuration.
In this repository35 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- dt-alertingSkill
- dt-app-dashboardsSkill
- dt-app-notebooksSkill
- dt-dql-essentialsSkill
- dt-js-runtimeSkill
- dt-migrationSkill
- dt-obs-analyticsSkill
- dt-obs-awsSkill
- dt-obs-azureSkill
- dt-obs-compliance-assistantSkill
- dt-obs-ext-monitorsSkill
- dt-obs-frontendsSkill
- dt-obs-gcpSkill
- dt-obs-genaiSkill
- dt-obs-hostsSkill
- dt-obs-kubernetesSkill
- dt-obs-log-semantic-mappingSkill
- dt-obs-logsSkill
- dt-obs-network-devicesSkill
- dt-obs-network-flowsSkill
- dt-obs-predictive-analyticsSkill
- dt-obs-problemsSkill
- dt-obs-servicesSkill
- dt-obs-tracingSkill
- dt-platform-costsSkill
- dt-sec-contextualizationSkill
- dt-sec-insightsSkill
- dt-sec-ioc-huntingSkill
- dt-sec-semantic-mappingSkill
- dt-setup-androidSkill
- dt-setup-iosSkill
- dt-setup-oneagentSkill
- dt-setup-react-nativeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 3 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Before asking the user anything, check whether dynatrace.config.yaml exists at the project root.
- Very specific: line 29
File exists: Read it, show the applicationId and beaconUrl, and confirm they match the target environment.
- Distinctive: line 37
Absent from either platform: Ask the user: "Do you have User Opt-In mode enabled or disabled?" (If unsure: Experience Vitals → Mobile → …
- Distinctive: line 41
Ask the user which approach they prefer:
- Very specific: line 54
Read references/config-yaml.md for the full template and conditional blocks.
- Very specific: line 64
Already under
dependencies: No change — proceed to Step 4. - Very specific: line 65
Under
dev_dependencies: Remove it from dev_dependencies, then run flutter pub add dynatrace_flutter_plugin. - Very specific: line 69
If Step 3 ran flutter pub add, dependencies are already fetched — skip this step.
- Very specific: line 94
Read lib/main.dart. Replace runApp(...) with Dynatrace().start(...):
- Very specific: line 107
Do not await Dynatrace().start() itself.
- Very specific: line 131
Read references/user-opt-in.md for the full guidance on DataCollectionLevel, crashReportingOptedIn, and placement options.
- Very specific: line 135
Check pubspec.yaml for the http package dependency.
- Distinctive: line 145
If none are present, note it for when network calls are added.
- Very specific: line 169
Read references/verification.md and show the user the verification checklist.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dynatrace Flutter Plugin Integration Skill
Prerequisites
- Flutter SDK installed and
flutteravailable onPATH - An existing Flutter project with a
pubspec.yamlat the project root - A Dynatrace environment with access to Experience Vitals (to obtain
applicationIdandbeaconUrl, or to downloaddynatrace.config.yaml) - Console access to Experience Vitals → Mobile to configure app settings (Data Privacy, Enablement and Cost Control)
dartCLI 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
applicationIdandbeaconUrl, and confirm they match the target environment. If correct, run theuserOptIncheck 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. Iffalse, 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):
- Open their Dynatrace environment
- Navigate to: Experience Vitals → New Frontend → Mobile
- Enter app name and choose Flutter as the platform
- 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.
- Download
dynatrace.config.yamland place it at the project root (same level aspubspec.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 fromdev_dependencies, then runflutter 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 getConfirm success before continuing.
Step 5 — Run the Dynatrace configuration script
dart run dynatrace_flutter_pluginThis 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, usedart run dynatrace_flutter_plugin- Manual edits to
build.gradle/build.gradle.ktsorInfo.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()callsrunAppinternally — remove any separaterunAppcallWidgetsFlutterBinding.ensureInitialized()is not required by Dynatrace beforestart(), but keep it if your app needs it for other pre-start initialization (for example, plugin or platform setup)- Do not
awaitDynatrace().start()itself; only useawaitfor other app initialization that must complete before callingstart()
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:
| 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.
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 theapplyUserPrivacyOptions(...)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— Fulldynatrace.config.yamltemplate with Grail and userOptIn conditional blocksreferences/user-opt-in.md—applyUserPrivacyOptionsguidance,DataCollectionLeveloptions, placement optionsreferences/verification.md— Post-setup verification checklist and troubleshooting
External References
- dynatrace_flutter_plugin on pub.dev — package changelog, API docs, and latest version
- Dynatrace Flutter Installation Docs — initial setup docs
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

