Xamarin

The Dynatrace.OneAgent.Xamarin NuGet package helps with auto-instrumenting Xamarin apps and offers an interface that makes it easy to add manual instrumentation to monitor additional HTTP frameworks or to tag users. The following screenshot shows a monitored Xamarin app in Dynatrace.

monitored xamarin app

monitored xamarin app

Get started

  1. In Visual Studio, right-click the main project of your app and select Manage NuGet packages.

  2. Search for Dynatrace.OneAgent.Xamarin and install the latest version.

install NuGet package

  1. In Dynatrace, define a new mobile app by going to Deploy Dynatrace > Set up mobile monitoring.

deploy a new mobile app

The Instrumentation settings page provides details such as application ID and beacon endpoint.

Configure your app

Follow the steps below to configure your app appropriately.

  1. On the Instrumentation page, click Google Android and select the Command line tab.

  2. In Visual Studio, create a new file in the Assets folder of your Android project called Dynatrace.properties and paste the content from the Dynatrace portal window.

android configuration

If you have a Forms-based application, update your *.Android.csproj file by adding a build target that invokes the Android auto-instrumentation.

The easiest way to edit the .csproj file is to:

  1. upload the project to Visual Studio,
  2. and open it directly in Visual Studio.

edit the .csproj file

Monitor web requests in your Forms project

Dynatrace automatically monitors web requests that are made using the frameworks that are available natively on Android and iOS. If you trigger requests directly from your .NET code, they can be captured only manually by the Mobile Agent. So, we've provided an interface for the commonly used HttpClient framework that allows you to set up request instrumentation with a single line of code. All other types of requests have to be instrumented differently.

monitor web requests

Crash reporting

Crashes are reported automatically. Dynatrace doesn't support .pdb files. Symbolication is only available based on Proguard mapping files or iOS dSYM files.

crash reporting