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)
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?
Solved! Go to Solution.
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.
Thanks for the suggestion, I can confirm that the workaround has worked.