Install .NET Core agent in Azure Service Fabric
You can monitor .NET Core applications hosted in Azure Service Fabric using the Site24x7 APM Insight .NET Core agent. Monitoring is supported in version 4.5.1 and up of the .NET Core agent.
You can install the agent using the steps below:
-
Add the Nuget package Site24x7.APMInsight.Agent to your Azure Service Fabric .NET Core project using the Package Manager Console in Visual Studio.
PM> Install-Package Site24x7.APMInsight.Agent
-
Set the environment variables in your application's ServiceManifest.xml file, as shown below:
<CodePackage>
... <EntryPoint>
<ExeHost>
...
<!-- It is mandatory for the WorkingFolder to be set as CodePackage. -->
<!-- This is because the environment variable to be persisted on the working folder to load the agent. -->
<WorkingFolder>CodePackage</WorkingFolder>
...
</ExeHost>
</EntryPoint>
...
<EnvironmentVariables>
...
<EnvironmentVariable Name="CORECLR_ENABLE_PROFILING" Value="1"/>
<EnvironmentVariable Name="CORECLR_PROFILER" Value="{9D363A5F-ED5F-4AAC-B456-75AFFA6AA0C8}"/>
<EnvironmentVariable Name="CORECLR_PROFILER_PATH_64" Value=".\site24x7\core\x64\ClrProfilerAgent.dll"/>
<EnvironmentVariable Name="CORECLR_PROFILER_PATH_32" Value=".\site24x7\core\x64\ClrProfilerAgent.dll"/>
<EnvironmentVariable Name="CORECLR_SITE24X7_HOME" Value=".\site24x7\core"/>
<EnvironmentVariable Name="DOTNET_ADDITIONAL_DEPS" Value=".\site24x7\core\additionalDeps"/>
<EnvironmentVariable Name="DOTNET_SHARED_STORE" Value=".\site24x7\core\store"/>
<EnvironmentVariable Name="S247_LICENSE_KEY" Value="xxxxxxxxxxxxxxxxxxxxxxxxx"/>
...
</EnvironmentVariables>
...
</CodePackage> -
Replace the license S247_LICENSE_KEY value with the Site24x7 license key copied from the portal.
- Publish the application in Azure Service Fabric.
- Perform transactions to start monitoring.
To view data, log in to your Site24x7 account, select APM Insight, and choose your application.
Note:
- Ensure that the agent files are within the Site24x7 folder in the root of the application to be published to Azure Service Fabric.
- Ensure that the environment variables are set correctly.