Splunk AppDynamics

Environment Variable and Path for Self Contained Deployment for Asp.net Core 2.x Application

CommunityUser
Splunk Employee
Splunk Employee

I need a clarification regarding the Resolution of relative path to the profiler Dll while setting up the AppD Agent for the Asp.net core application in the environment variables

Our application uses SCD (Self contained Deployment) and is deployed in on Premise IIS Servers. My Question is regarding the Path location for the AppDynamics Profile dll (AppDynamics.Profiler_x86.dll, AppDynamics.Profiler_x64.dll) for Environment Variable CORECLR_PROFILER_PATH_32 and CORECLR_PROFILER_PATH_64.

Is AppDynamics able to resolve the relative path correctly if the value of the environment variable CORECLR_PROFILER_PATH_32  is ".\AppDynamics.Profiler_x86.dll"? 

The web.config looks like

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\Service.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" >
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Staging" />
<environmentVariable name="CORECLR_ENABLE_PROFILING" value="1" />
<environmentVariable name="CORECLR_PROFILER" value="{39AEABC1-56A5-405F-B8E7-C3668490DB4A}"/>
<environmentVariable name="CORECLR_PROFILER_PATH_32" value=".\AppDynamics.Profiler_x86.dll"/>
<environmentVariable name="CORECLR_PROFILER_PATH_64" value=".\AppDynamics.Profiler_x64.dll"/>
</environmentVariables>
</aspNetCore>
</system.webServer>
</configuration>

I am following the instructions at the link 

https://docs.appdynamics.com/display/PRO44/Install+the+.NET+Core+Microservices+Agent+for+Windows

As per the second instruction, we need to set the following environment variables and the path should be the Complete path. 

Set up your Environment Variables for your system application:

CORECLR_ENABLE_PROFILING=1
CORECLR_PROFILER={39AEABC1-56A5-405F-B8E7-C3668490DB4A}
CORECLR_PROFILER_PATH_32=<actual_path>\AppDynamics.Profiler_x86.dll
CORECLR_PROFILER_PATH_64=<actual_path>\AppDynamics.Profiler_x64.dll

Where <actual_path> is the complete path to the AppDynamics.Profiler dll.

Labels (1)
1 Solution

Ashish_Singh
Communicator

Hi Abhinav,

Yes, The relative path will also work and resolve correctly.

For example, if we use the below configuration in the Web.config file. It works and agent is able to instrument the application.

<environmentVariables>
<environmentVariable name="CORECLR_ENABLE_PROFILING" value="1" />
<environmentVariable name="CORECLR_PROFILER" value="{39AEABC1-56A5-405F-B8E7-C3668490DB4A}" />
<environmentVariable name="CORECLR_PROFILER_PATH_64" value=".\AppDynamics.Profiler_x64.dll" />
</environmentVariables>

Let us know if it helps or you have any question on this.

Thanks,

Ashish.

View solution in original post

Ashish_Singh
Communicator

Hi Abhinav,

Yes, The relative path will also work and resolve correctly.

For example, if we use the below configuration in the Web.config file. It works and agent is able to instrument the application.

<environmentVariables>
<environmentVariable name="CORECLR_ENABLE_PROFILING" value="1" />
<environmentVariable name="CORECLR_PROFILER" value="{39AEABC1-56A5-405F-B8E7-C3668490DB4A}" />
<environmentVariable name="CORECLR_PROFILER_PATH_64" value=".\AppDynamics.Profiler_x64.dll" />
</environmentVariables>

Let us know if it helps or you have any question on this.

Thanks,

Ashish.

CommunityUser
Splunk Employee
Splunk Employee

Thanks Ashish for the prompt Response.

It might be helpful, if you could add this information in the docs. Another developer understood that only Absolute path is supported.

https://docs.appdynamics.com/display/PRO44/Install+the+.NET+Core+Microservices+Agent+for+Windows "Where <actual_path> is the complete path to the AppDynamics.Profiler dll."

Thanks,

Abhinav Galodha

0 Karma

Ashish_Singh
Communicator

Thanks Abhinav for the update.

 

In the document ( https://docs.appdynamics.com/display/PRO44/Install+the+.NET+Core+Microservices+Agent+for+Windows), the suggested Environment variables are for the System level. So there we need to provide the complete path. 

But when we configure these Environment variables at the specific application level and configure through web.config file. We can also give the relative path as suggested. it will also work.

We will share the suggestion with the document team to update this information.

Thanks,

Ashish.

Jeanie_Kedia1
Communicator

Thanks for the feedback @Anonymous

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

This is the third post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...