Splunk AppDynamics

Problems .net 5 WebAPI unable to instrument using .NET Core for Linux SDK

Maximiliano_Gui
Path Finder

Hello, I have a net 5 WebAPI deployed in a docker linux container. I want to instrument the application in AppDynamics. The application works and I test it everytime with swagger

I've tried 2 implementations

  1. Install the .NET Core Microservices Agent for Windows -> https://docs.appdynamics.com/4.5.x/en/application-monitoring/install-app-server-agents/net-agent/net...
  2. .NET Core for Linux SDK -> https://docs.appdynamics.com/21.5/en/application-monitoring/install-app-server-agents/net-agent/net-...

The first scenario didn't work for me I got a consistent error, a single log line saying "use clr profiler", 

The second does nothing at all I have no feedback what so ever and no log is created

This is my Docker configuration

"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/Swagger",
"environmentVariables": {
"CORECLR_PROFILER": "{57e1aa68-2229-41aa-9931-a6e93bbc64d8}",
"CORECLR_ENABLE_PROFILING": "1",
"CORECLR_PROFILER_PATH": "/app/bin/Debug/net5.0/runtimes/linux-64/native/libappdprofiler.so",
"APPDYNAMICS_LOG_PATH": "/app/bin/Debug/net5.0"
},
"publishAllPorts": true,
"useSSL": true
}

And this is the app dynamics configuration
{
"feature": [
"FULL_AGENT"
],
"controller": {
"host": "MYHOST.saas.appdynamics.com",
"port": 443,
"account": "myAccount",
"password": "mypassword",
"ssl": true,
"enable_tls12": true
},
"application": {
"name": "myapplicationname",
"tier": "my-appliation-tier",
"node": ""
},
"log": {
"directory": "/app/bin/Debug/net5.0",
"level": "ALL"
}
}

Labels (1)
0 Karma
1 Solution

Sarabjit-Tatra
Explorer

@Maximiliano.Guillen - As your application is net 5 WebApi deployed in a docker linux container you will need to use the .Net agent on Linux as mentioned below:

https://docs.appdynamics.com/22.1/en/application-monitoring/install-app-server-agents/net-agent/net-...

Also kindly find below the below the inputs for 2 implementation you tried:

  1. Install the .NET Core Microservices Agent for Windows 
    • [AppD-This will only work for .Net core application on Windows and as you are using WebApi deployed in a docker linux you will need to use the above link mentioned for .Net agent on Linux]
  2. .NET Core for Linux SDK 
    • [AppD-Thieir is no new work happeing on this as thier was some custom configruation requried to detect BTs etc so you will need to use the above link mentioned for .Net agent on Linux as this detects the BTs etc OOTB]

Let us know if you still face any issues.

View solution in original post

iamryan
Community Manager
Community Manager

Hi @Maximiliano.Guillen,

I found this info - please let me know if it helped.

Can you please confirm the .Net Microservices Agent version that you are using to instrument the .Net 5 application? The .Net Microservices agent started supporting .Net 5 with agent version >21.10. Ref below link for details:
https://docs.appdynamics.com/21.10/en/application-monitoring/install-app-server-agents/net-agent/net... 


If you are using an older agent, could you kindly try upgrading to the latest 21.11 version of the agent and verify the behavior?

Maximiliano_Gui
Path Finder

Hi Ryan, 

I was using the latest, its a brand new solution.

0 Karma

iamryan
Community Manager
Community Manager

Hi @Maximiliano.Guillen,

Just to confirm, you are using the latest version, and are still having the issue?

0 Karma

Maximiliano_Gui
Path Finder

Yes with the .net core agent from the nuget package yes, I was going to test the linux agent from step 2 but I'm changing scope for now

0 Karma

iamryan
Community Manager
Community Manager

Hi @Maximiliano.Guillen,

I was chatting with some internal people and it's been suggested you contact support.

You can get to the Support Portal from here: https://www.appdynamics.com/support

Please do follow back up on this thread if a solution is reached with support.

Sarabjit-Tatra
Explorer

@Maximiliano.Guillen - As your application is net 5 WebApi deployed in a docker linux container you will need to use the .Net agent on Linux as mentioned below:

https://docs.appdynamics.com/22.1/en/application-monitoring/install-app-server-agents/net-agent/net-...

Also kindly find below the below the inputs for 2 implementation you tried:

  1. Install the .NET Core Microservices Agent for Windows 
    • [AppD-This will only work for .Net core application on Windows and as you are using WebApi deployed in a docker linux you will need to use the above link mentioned for .Net agent on Linux]
  2. .NET Core for Linux SDK 
    • [AppD-Thieir is no new work happeing on this as thier was some custom configruation requried to detect BTs etc so you will need to use the above link mentioned for .Net agent on Linux as this detects the BTs etc OOTB]

Let us know if you still face any issues.

Maximiliano_Gui
Path Finder

Hi @Sarabjit.Tatra 

Is it mandatory for the linux files to be in opt/appdynamics/dotnet ? 
I could place them in what ever folder in the container and map the env variable, correct?

0 Karma

Sarabjit-Tatra
Explorer

@Maximiliano.Guillen - Yes you can keep in any folder we just need to make sure all the AppD dlls are also present their.

0 Karma

Maximiliano_Gui
Path Finder

I had some progress but now I get the following in the container log

appd.agent.profiler(Info): Successfully locate config file from /app/bin/Debug/net5.0/MyProject.AppDynamicsConfig.json
appd.agent.profiler(Warn): Failed to verify loaded config : node nameconfig file entry or environment variable APPDYNAMICS_AGENT_NODE_NAME is empty
appd.agent.profiler(Warn): Failed to load configuration, profiler will not attach.
appd.agent.profiler(Warn): Profiler initialization failed and .NET Agent is disabled.

0 Karma

Sarabjit-Tatra
Explorer

@Maximiliano.Guillen - You need to specify node name as its missing in you JSON using "node": "" tag or setting APPDYNAMICS_AGENT_NODE_NAME environment variable.

0 Karma

Maximiliano_Gui
Path Finder

Thanks for the help, I'll try this next, and re-open or create a support ticket later if necessary. 

Get Updates on the Splunk Community!

Get Schooled with Splunk Education: Explore Our Latest Courses

At Splunk Education, we’re dedicated to providing incredible learning experiences that cater to every skill ...

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...