cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dynatrace Xamarin Native Android Auto Instrumentation

jakub
Newcomer

Hi All,

I'd like to monitor my Native Android Xamarin app with Dynatrace OneAgent.

To auto-instrument my app I have tried the below (using Visual Studio)

1. Firstly, I have tried to auto-instrument by following this guide. Basically, all it tells (for native android) is to add Dynatrace.OneAgent.Xamarin nuget package and add Dynatrace.properties file in the assets folder. This has not worked, I did not see any data in the Dynatrace portal.

2. Secondly, I have tried the below after which I was able to see app data coming in Dynatrace portal - meaning the auto-instrumentation has worked. This is as per instructions on the dynatrace portal (instrumentation section)

  1. Download OneAgent for Android
  2. Created Dynatrace.properties file
  3. build and copy my apk file into the OneAgent folder
  4. call instrument.cmd apk=<AppName>.apk prop=Dynatrace.propertie

I was under impression that the nuget package automagically injects the mobile agent into my app (no source code modification required). Can someone who has successfully auto-instrumented a native android xamarin app tell me if there is anything else that needs to be done when using the nuget package?

Thanks

Jakub


2 REPLIES 2

matthias_hochri
Dynatrace Pro
Dynatrace Pro

Hello Jakub,

You are right usually this should work out of the box as we are adding the target automatically. It seems something didn't work as intended. As workaround you can add the Target snippet which is described in the documentation (https://www.nuget.org/packages/Dynatrace.OneAgent.... to your csproj file.

In the mean time I will try to find out why applying the target didn't work.


jakub
Newcomer

Hi Matthias,

Thanks for the suggestion, I can confirm that the workaround has worked.


Featured Posts