On this page:

Related pages:

Your Rating:
Results:
PatheticBadOKGoodOutstanding!
9 rates

The AppDynamics  .NET Core for Linux SDK lets you monitor the performance of .NET Core applications running on Linux.

The SDK supports the following features:

  • business transaction registration and error reporting
  • exit call with correlation and error reporting
  • metrics
  • and snapshots with user properties but without callgraphs.

Together, these tools give you visibility on application load and response times, and any custom metrics you define.

You monitor .NET Core applications by deploying the .NET Core for Linux SDK to your application directory and project.

Once running, the agent registers business transactions with the AppDynamics Controller. You can then see your application flow map and monitor performance in the Controller

Before You Begin

  1. Confirm you have access to a compatible Controller. See Agent and Controller Compatibility
  2. Confirm the connection settings to the Controller where your agent will report data:
    • If you use a SaaS Controller, AppDynamics sent you the controller host in your Welcome Email.  Use port 443 for HTTPS or port 80 for HTTP.
    • If you use an on-premises Controller, you supplied the host and port at install time.
  3. Verify you have access the machine where the application runs as a user account with privileges to install the agent software and restart the application.
  4. Verify that the machine where the application runs can connect to the Controller. Proxies or firewalls on the network between the agent and Controller may require additional configuration.

Prepare to Install

Ensure you have the following:

  • .NET Core SDK
  • .NET Core application running on Linux
  • AppDynamics.AgentSDK NuGet package
  • Visual Studio or other IDE

Install the SDK

Complete the following steps manually, using Visual Studio or another integrated development environment (IDE).

  1. Download the AppDynamics.AgentSDK NuGet package and copy it to a directory of your choice, such as /users/appdynamics/packages
  2. Update your build scripts to be able to access the AppDynamics SDK library files. 
    In your application directory, add the following lines to your Linux project:

    <PropertyGroup>
        <RestoreSources>$(RestoreSources);<<path_to_AppDynamics.AgentSDK>>;https://api.nuget.org/v3/index.json</RestoreSources>
      </PropertyGroup>
  3. Run dotnet restore.
  4. Then run dotnet add package AppDynamics.AgentSDK_x64
    This extracts the files from the NuGet package into the application folder.
  5. Modify your project to use the AppDynamics SDK. See .NET Core for Linux SDK Reference
    Add the SDK namespace and SDK code to the application. For example:

    using AppDynamics;
    ...
    namespace coremvc.Controllers
    {
       public class HomeController : Controller
       {
          public IActionResult SomePage()
          {
              var currCtxId = AgentSDK.StartBusinessTransaction("DemoBT", "ASP_DOTNET", "");
              // Code here calls to other ASP_DOTNET component
    			...
              AgentSDK.StopBusinessTransaction(currCtxId);
              return View();
           }
           ...
  6. Run dotnet build or dotnet publish.
    A warning message appears stating the AppDynamics configuration has not been updated. This is normal.
    • Running dotnet build adds the following AppDynamics configuration file to your application:
      <application_directory>: AppDynamicsConfig.json
    • Running dotnet publish renames the AppDynamicsConfig.json file and copies it to the publish directory for the App iQ .NET Core for Linux SDK to reference and use:
      <publish_directory): <project_name>.AppDynamicsConfig.json
  7. Proceed to Using .NET Core for Linux SDK for instructions on updating the AppDynamics.Config.json file and connecting the agent to the Controller.

Known Issues

Requirement to disable loading of native images (NGEN) for self-contained apps compiled with .NET Core 2.0

Due to a bug in the .NET Core runtime (see https://github.com/dotnet/coreclr/issues/13021), the command the .NET Core for Linux SDK profiler sends to the runtime to disable loading of native images is ignored. This prevents AppDynamics from instrumenting any methods in these assemblies which include most of the .NET Standard libraries.

A workaround for this bug is to disable using native images by setting the following environment variable:

COMPLUS_ReadyToRun=0

  • No labels