Using .NET APM Agent to monitor server side SharePoint IIS sites

I have been attempting to setup the .NET Agent for use on a SharePoint IIS site following the instructions that I found in Cannot make APM Client work on IIS. The sites are managed by other members of my team and I am trying to put together a process so this could be done in scale if need be.

However, upon using the NuGet CLI, I receive the following packages:
Ben.Demystifier.0.1.6
Elastic.Apm.1.6.1
Elastic.Apm.AspNetFullFramework.1.6.1
Microsoft.Diagnostics.Tracing.TraceEvent.2.0.2
Newtonsoft.Json.11.0.2
System.Buffers.4.4.0
System.Collections.Immutable.1.5.0
System.Diagnostics.DiagnosticSource.4.6.0
System.Memory.4.5.3
System.Numerics.Vectors.4.4.0
System.Reflection.Metadata.1.6.0
System.Runtime.CompilerServices.Unsafe.4.5.2
System.Threading.Tasks.Dataflow.4.9.0
System.Threading.Tasks.Extensions.4.5.3

Are all of these dll's necessary and is this the right way of going about this? If not, some more precise instructions would be appreciated.

If any other information is needed please let me know and thanks for the assistance.

1 Like

Hi @tkuhns,

regarding the list of dlls: Yes, the agent depends on those, so you'll need those dependencies, otherwise loading the agent dependency will fail.

I haven't had much luck getting the .NET agent to display in Kibana. I downloaded the Elastic.Apm.AspNetFullFramework package and moved the dll's related to dotnet versions 4.5 and 4.6 to the bin folder of the site.

I updated the web.config file with the following:

  • Added the ElasticAPM module
    <modules> <add name="ElasticApmModule" type="Elastic.Apm.AspNetFullFramework.ElasticApmModule, Elastic.Apm.AspNetFullFramework" /> </modules>

  • Added configuration settings for the APM
    <appSettings> <add key="ElasticApm:ServerUrls" value="http://APMSERVERNAME:8200" /> <add key="ElasticApm:ServiceNodeName" value="SITENAME" /> <add key="ElasticApm:CaptureBody" value="all" /> </appSettings>

  • Had to bind the System.Net.Http version to get past an error the site was receiving after adding the APM entries
    <assemblyBinding> <dependentAssembly> <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.0.0.0" /> </dependentAssembly> </assemblyBinding>

The site seems a bit unstable after making these changes. Sometimes I receive a 500 error, but this is sporadic and I haven't been able to figure out the root cause. When the site does load, I don't receive any transaction data in Kibana like I would expect. Any ideas/suggestions?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.