On this page, you will learn how to perform initial setup for .NET MAUI frontends.
Prerequisites
Before you begin, ensure your environment meets the following requirements:
Requirement
Minimum Version
.NET
8.0
Android API Level
21
iOS SDK
12
Enable the New RUM Experience for a mobile frontend
Go to Experience Vitals > Overview.
Select Mobile to view all mobile frontends.
Select the frontend you want to configure.
Navigate to the Settings tab.
Under Enablement and cost control, turn on New Real User Monitoring Experience.
Enable the New RUM Experience at the environment level
To enable the New RUM Experience for mobile frontends at the environment level:
Go to Settings > Collect and capture > Real User Monitoring > Mobile frontends > Traffic and cost control.
Turn on Enable New Real User Monitoring Experience.
Initial setup
1. Create a Dynatrace mobile application
Go to Experience Vitals.
Select Add Frontend in the upper-right corner.
Follow the steps in the Frontend creation wizard.
Select MAUI as your platform.
Complete the wizard to generate your dynatrace.config.json file.
Download and add the configuration file into your project.
Add the dynatrace.config.json file to the Platforms/Android/Assets directory of your project.
If you cannot find the Assets directory, create it inside the Platforms/Android directory.
Add the dynatrace.config.json file to the Platforms/iOS/Resources directory of your project.
Optional To set up health alerts for this frontend, under Alerts, select a service user and the metrics to monitor. Alerts are activated with default detection parameters, which you can customize in the frontend settings after setup is complete. For details, see Health alerts for frontends.
2. Add the Dynatrace NuGet package to your project
Add the Dynatrace .NET MAUI NuGet package to your application.
Use Visual Studio
In Visual Studio, right-click the solution of your mobile application and select Manage NuGet packages.
Select the checkboxes of all the projects to which you want to add the NuGet package. Make sure you're adding the package to your native projects, as the target files within our package interact with the build.
Select OK.
Add the Dynatrace MAUI NuGet package to your MAUI project.
Use .NET CLI
Use the following command to add the Dynatrace dependency to your project:
dotnet add package Dynatrace.OneAgent.MAUI
For more information, please see our nuget.org page.
3. Initialize the package
The start method is required for the OneAgent to initialize and capture data.
using Dynatrace.MAUI;
Agent.Instance.Start();
Verify your installation
After installing and configuring the Dynatrace .NET MAUI NuGet package, verify that data is being collected:
Open your app and perform several actions (navigate between screens, tap buttons, and make network requests).
Go to your mobile frontend in Dynatrace:
Go to Experience Vitals > Overview.
Select Mobile to view all mobile frontends.
Select the frontend you want to configure.
Verify that sessions and user actions appear in the data.
This data can also be analyzed directly in Grail using DQL.
It may take a few minutes for data to appear in Dynatrace after the first app launch.
Next steps
After completing the initial setup, consider exploring the following topics to enhance your monitoring capabilities: