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

Xamarin Forms Network Requests Automatic Instrumentation and Tracking

Osama.Abbas
Producer

I am trying to instrument a Xamarin Forms app with the following configuration:.

 

var config = AppDynamics.Agent.AgentConfiguration.Create("<EUM_APP_KEY>");
config.CollectorURL = "http://<IP_Address>:7001";
config.CrashReportingEnabled = true;
config.ScreenshotsEnabled = true;
config.LoggingLevel = AppDynamics.Agent.LoggingLevel.All;
AppDynamics.Agent.Instrumentation.EnableAggregateExceptionHandling = true;
AppDynamics.Agent.Instrumentation.InitWithConfiguration(config);

 

In the documentation, it is stated that: The Xamarin Agent does not support automatic instrumentation for network requests made with any library. You will need to manually instrument HTTP network requests regardless of what library is used. Mobile RUM Supported Environments (appdynamics.com)

Yet, in these links Customize the Xamarin Instrumentation (appdynamics.com) and Instrument Xamarin Applications (appdynamics.com) I see that I can use AppDynamics.Agent.AutoInstrument.Fody package to automatically instrument the network requests.

I tried to follow the approach of automatic instrumentation using both AppDynamics.Agent and AppDynamics.Agent.AutoInstrument.Fody packages as per the docs, but I get the below error when building the project:

 

MSBUILD : error : Fody: An unhandled exception occurred:
    MSBUILD : error : Exception:
    MSBUILD : error : Failed to execute weaver /Users/username/.nuget/packages/appdynamics.agent.autoinstrument.fody/2023.12.0/build/../weaver/AppDynamics.Agent.AutoInstrument.Fody.dll
    MSBUILD : error : Type:
    MSBUILD : error : System.Exception
    MSBUILD : error : StackTrace:
    MSBUILD : error :   at InnerWeaver.ExecuteWeavers () [0x0015a] in C:\projects\fody\FodyIsolated\InnerWeaver.cs:222
    MSBUILD : error :   at InnerWeaver.Execute () [0x000fe] in C:\projects\fody\FodyIsolated\InnerWeaver.cs:112
    MSBUILD : error : Source:
    MSBUILD : error : FodyIsolated
    MSBUILD : error : TargetSite:
    MSBUILD : error : Void ExecuteWeavers()
    MSBUILD : error : Sequence contains more than one matching element
    MSBUILD : error : Type:
    MSBUILD : error : System.InvalidOperationException
    MSBUILD : error : StackTrace:
    MSBUILD : error :   at System.Linq.Enumerable.Single[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00045] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/Single.cs:71
    MSBUILD : error :   at AppDynamics.Agent.AutoInstrument.Fody.ImportedReferences.LoadTypes () [0x000f1] in /opt/buildAgent/work/2ab48d427bca2ab0/sdk/AppDynamics.Agent.AutoInstrument.Fody/ImportedReferences.cs:117
    MSBUILD : error :   at AppDynamics.Agent.AutoInstrument.Fody.ImportedReferences..ctor (ModuleWeaver weaver) [0x0000d] in /opt/buildAgent/work/2ab48d427bca2ab0/sdk/AppDynamics.Agent.AutoInstrument.Fody/ImportedReferences.cs:90
    MSBUILD : error :   at ModuleWeaver.Execute () [0x00000] in /opt/buildAgent/work/2ab48d427bca2ab0/sdk/AppDynamics.Agent.AutoInstrument.Fody/ModuleWeaver.cs:17
    MSBUILD : error :   at InnerWeaver.ExecuteWeavers () [0x000b7] in C:\projects\fody\FodyIsolated\InnerWeaver.cs:204
    MSBUILD : error : Source:
    MSBUILD : error : System.Core
    MSBUILD : error : TargetSite:
    MSBUILD : error : Mono.Cecil.MethodDefinition Single[MethodDefinition](System.Collections.Generic.IEnumerable`1[Mono.Cecil.MethodDefinition], System.Func`2[Mono.Cecil.MethodDefinition,System.Boolean])

 

Any help please?

Thank you

2 REPLIES 2

Ryan.Paredez
Community Manager

Hi @Osama.Abbas,

I shared your feedback with the Docs team! If I find any other information around your question, I'll share it here. 


Thanks,

Ryan, Cisco AppDynamics Community Manager




Found something helpful? Click the Accept as Solution button to help others find answers faster.

Liked something? Click the Thumbs Up button.



Check out Observabiity in Action

new deep dive videos weekly in the Knowledge Base.

Ryan.Paredez
Community Manager

Hi @Osama.Abbas,

I'm still waiting to hear back from our Docs team. Have you found a solution or any new info in the meantime?


Thanks,

Ryan, Cisco AppDynamics Community Manager




Found something helpful? Click the Accept as Solution button to help others find answers faster.

Liked something? Click the Thumbs Up button.



Check out Observabiity in Action

new deep dive videos weekly in the Knowledge Base.

On-Demand Webinar
Discover new Splunk integrations and AI innovations for Cisco AppDynamics.


Register Now!

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here
Top Kudoed Authors