Download PDF
Download page Install AppDynamics for Azure Service Fabric.
Install AppDynamics for Azure Service Fabric
The following instructions explain how to deploy the .NET microservices agent for AppDynamics for Azure Service Fabric.
Before you Install
From nuget.org, download the NuGet package AppDynamics.Agent.Distrib.Micro.Windows from https://www.nuget.org/packages/AppDynamics.Agent.Distrib.Micro.Windows/, then extract it to a folder. Then, use the following instructions to deploy the agent package.
Choose a procedure below to match your environment:
- Deploy the Package using Visual Studio
- Deploy the Package using another IDE
Deploy the Package using Visual Studio
- From your editor, open
ServiceManifest.xml
in each folder in the published application root. Add the following environment variables in each CodePackage:
<CodePackage ...>
<EntryPoint>
...
</EntryPoint>
<EnvironmentVariables>
<EnvironmentVariable Name="COR_ENABLE_PROFILING" Value="1" />
<EnvironmentVariable Name="COR_PROFILER" Value="{39AEABC1-56A5-405F-B8E7-C3668490DB4A}" />
<EnvironmentVariable Name="COR_PROFILER_PATH" Value=AppDynamics/AppDynamics.Profiler_x64.dll" />
</EnvironmentVariables>
</CodePackage>
Make a copy of the of the
AppDynamicsConfig.json
file and rename it to <<executable_name>>.AppDynamicsConfig.json.
For example, <<servicefabricapplicationname
>>.AppDynamicsConfig.json.
Copy
AppDynamics.Agent.dll
,AppDynamics.Profiler_x64.dll
,AppDynamicsAgentLog.config
,AppDynamicsConfig.json
from <<nuget_package
>>\content\AppDynamics
and add these files in the Visual Studio solution of each of the service project at the top level, not under any subfolders.Make a copy of
AppDynamicsConfig.json
and rename it to:<<executable_name>>.AppDynamicsConfig.json
, for example,<<
servicefabricapplicationname>>.AppDynamicsConfig.json. Put it into the root of each service project.When you rename the
.json
file to the application name, do not include.exe
at the end of your application name.Right-click on the files in the AppDynamics sub-folder and select Copy Always.
Update
<<executable_name>>.AppDynamicsConfig.json
with your configuration information:{
"controller":
{
"host":"",
"port":0,
"account":"",
"password":""
},
"application":
{
"name":""
}
}
Do not specify node; it will be assigned automatically; Specifying tier is optional, it could be assigned automatically.
For information about the AppDynamicsConfig.json file, see AppDynamicsConfig.json File.
Next steps are optional and should only be used if you need per service-instance control of the controller/application/tier.
- Add the following environment variables to each CodePackage:
<EnvironmentVariable Name="appdynamics.controller.hostName" Value="<< >>" />
<EnvironmentVariable Name="appdynamics.controller.port" Value="<< >>" />
<EnvironmentVariable Name="appdynamics.agent.accountName" Value="<< >>" />
<EnvironmentVariable Name="appdynamics.agent.accountAccessKey" Value="<< >>" />
<EnvironmentVariable Name="appdynamics.agent.applicationName" Value="<< >>" />
<EnvironmentVariable Name="appdynamics_agent_tier_name" Value="<< >>" />
- Modify
ApplicationManifest.xml.
In each ServiceManifestImport and CodePackage folder add:- In
ServiceManifestImport
:<EnvironmentOverrides CodePackageRef="Code">
<EnvironmentVariable Name="appdynamics.controller.hostName" Value="<<AppD_ControllerHostName>>" />
<EnvironmentVariable Name="appdynamics.controller.port" Value="<<AppD_ControllerPort>>" />
<EnvironmentVariable Name="appdynamics.agent.accountName" Value="<<AppD_AccountName>>" />
<EnvironmentVariable Name="appdynamics.agent.accountAccessKey" Value="<<AppD_AccountAccessKey>>" />
<EnvironmentVariable Name="appdynamics.agent.applicationName" Value="<<AppD_ApplicationName>>" />
<EnvironmentVariable Name="appdynamics_agent_tier_name" Value="<<AppD_Service_Name_TierName>>" />
</EnvironmentOverrides>
- In
Parameters
:<Parameter Name="AppD_ControllerHostName" DefaultValue="<<Your_Controller_Name>>" />
<Parameter Name="AppD_ControllerPort" DefaultValue="<<Your_Controller_Port>>" />
<Parameter Name="AppD_AccountName" DefaultValue="<<Your_Controller_Account_Name>>" />
<Parameter Name="AppD_AccountAccessKey" DefaultValue="<<Your_Controller_Access_Key>>" />
<Parameter Name="AppD_ApplicationName" DefaultValue="<<Your_Controller_App_Name>>" /> - For each service:
<Parameter Name="AppD_%SERVICE_NAME%_TierName" DefaultValue="<<Tier_Name_For_Service>>" />
- In
- If you need to provide the AppDynamics configuration during application package deployment, you can now do it using the -
ApplicationParameter
switch of theNew-ServiceFabricApplication cmdlet
.
Deploy the Package using another IDE
- From your editor, open
ServiceManifest.xml
in each folder in the published application root. Add the following environment variables in each CodePackage:
<CodePackage ...>
<EntryPoint>
...
</EntryPoint>
<EnvironmentVariables>
<EnvironmentVariable Name="COR_ENABLE_PROFILING" Value="1" />
<EnvironmentVariable Name="COR_PROFILER" Value="{39AEABC1-56A5-405F-B8E7-C3668490DB4A}" />
<EnvironmentVariable Name="COR_PROFILER_PATH" Value=AppDynamics/AppDynamics.Profiler_x64.dll" />
</EnvironmentVariables>
</CodePackage>Using PowerShell, unpack
AppDynamics.Agent.dll
,AppDynamics.Profiler_x64.dll
,AppDynamicsAgentLog.config
,AppDynamicsConfig.json
from <nuget_package>\content\AppDynamics to the code package folder that contains the executable you want to run.Make a copy of the of the
AppDynamicsConfig.json
file and rename it to<<executable_name>>.AppDynamicsConfig.json
. For example,<<
servicefabricapplicationname>>.AppDynamicsConfig.json.When you rename the .json file to the application name, do not include .exe at the end of your application name.
Make a copy of
AppDynamicsConfig.json
and rename it to:<<executable_name>>.AppDynamicsConfig.json. For example,<<servicefabricapplicationname>>.AppDynamicsConfig.json.
Put it into the root of each service project.Update
<<executable_name>>.AppDynamicsConfig.json
with your configuration information:{
"controller":
{
"host":"",
"port":0,
"account":"",
"password":""
},
"application":
{
"name":""
}
}
Do not specify the node; it will be assigned automatically. Specifying the tier is optional; it could be assigned automatically.
For information about the AppDynamicsConfig.json file, see AppDynamicsConfig.json File.
Next steps are optional and should only be used if you need per service-instance control of the controller/application/tier.
- Add the following environment variables to each CodePackage:
<EnvironmentVariable Name="appdynamics.controller.hostName" Value="" />
<EnvironmentVariable Name="appdynamics.controller.port" Value="" />
<EnvironmentVariable Name="appdynamics.agent.accountName" Value="" />
<EnvironmentVariable Name="appdynamics.agent.accountAccessKey" Value="" />
<EnvironmentVariable Name="appdynamics.agent.applicationName" Value="" />
<EnvironmentVariable Name="appdynamics_agent_tier_name" Value="" />
- Modify
ApplicationManifest.xml
. In eachServiceManifestImport
andCodePackage
folder add:- In
ServiceManifestImport
:<EnvironmentOverrides CodePackageRef="Code">
<EnvironmentVariable Name="appdynamics.controller.hostName" Value="<<AppD_ControllerHostName>>" />
<EnvironmentVariable Name="appdynamics.controller.port" Value="<<AppD_ControllerPort>>" />
<EnvironmentVariable Name="appdynamics.agent.accountName" Value="<<AppD_AccountName>>" />
<EnvironmentVariable Name="appdynamics.agent.accountAccessKey" Value="<<AppD_AccountAccessKey>>" />
<EnvironmentVariable Name="appdynamics.agent.applicationName" Value="<<AppD_ApplicationName>>" />
<EnvironmentVariable Name="appdynamics_agent_tier_name" Value="<<AppD_Service_Name_TierName>>" />
</EnvironmentOverrides>
- In
Parameters
:<Parameter Name="AppD_ControllerHostName" DefaultValue="<<Your_Controller>>" />
<Parameter Name="AppD_ControllerPort" DefaultValue="<<Your_ControllerPORT>>" />
<Parameter Name="AppD_AccountName" DefaultValue="<<Your_Controller_AccountName>>" />
<Parameter Name="AppD_AccountAccessKey" DefaultValue="<<Your_Controller_AccessKey>>" />
<Parameter Name="AppD_ApplicationName" DefaultValue="<<Your_Controller_App_Name>>" /> - For each service:
<Parameter Name="<<AppD_Service_Name_TierName>>" DefaultValue="<<Tier_Name_For_Service>>" />
- In
- If you need to provide the AppDynamics configuration during application package deployment, you can now do it using the -
ApplicationParameter
switch of theNew-ServiceFabricApplication cmdlet
.