Microsoft .NET Core

The .NET Core agent enables you to monitor the performance of .NET Core applications. The .NET Core Agent uses the application entry point name as the agent name. For example, the dotnet.exe ContosoUniversity.dll entry point uses ContosoUniversity as the agent name.
apmsaas
The .NET Core Agent has tracers for MVC, HTTP, SQL, and the Entity Framework. The .NET Core Agent uses the application entry point name as the agent name. For example, the
dotnet.exe ContosoUniversity.dll
entry point uses
ContosoUniversity
as the agent name.
Windows and Linux support .NET Core 2.0 and 3.1. For Windows, the .NET Core Agent is included with the .NET agent, which detects and monitors .NET and .NET Core applications. For Linux, you must download and install the .NET Core Agent for Linux.
Install the .NET Core Agent for Windows
After you get access to
DX APM
, you download and extract the .NET Agent. For more information, see Install the .NET Agent.
Install the .NET Core Agent for Linux
After you get access to
DX APM
, you download and extract the .NET agent. You install the .NET agent interactively by starting the .NET agent installer program and responding to the prompts displayed.
Follow these steps:
  1. Copy the package to a target system.
  2. Extract the contents of the package tarball into a location using the tar extraction utility. For example:
    $ tar -xvf .NET_v1.tar
  3. Export these environment variables:
    export CORECLR_ENABLE_PROFILING=1
    'export CORECLR_PROFILER={5F048FC6-251C-4684-8CCA-76047B02AC98}' 'export CORECLR_PROFILER_PATH_64=AGENT_HOME/wily/bin/wily.NativeProfiler.so' 'export APMENV_AGENT_PROFILE=AGENT_HOME/wily/IntroscopeAgent.profile' r
  4. Restart your .NET Core application.
Log Files
Find the .NET Core Agent log files in the
<Agent_Home>/logs
directory.
Troubleshooting
Symptom
The .NET Core Agent is not enabled; the agent is not providing data about the monitored .NET Core application. You cannot find any associated logs.
Solution
Use this solution only when the logs in the
<Agent_Home>/logs
directory are not present, or only the
nativeprofiler
log is present. Otherwise, use the following information to troubleshoot.
Install and examine the .NET Core diagnostic logs to help determine why the .NET Core Agent is not functioning. The .NET Core Agent provides diagnostic logs that use simple IO modules and dump statistics. The logs can help you debug issues when the agent does not load fully.
Follow these steps:
  1. Run this command at a command prompt to install the .NET Core Agent diagnostic logs.
    export APM_DIAGNOSTICS_ENABLED=1
  2. Navigate to
    <User_Home>/compat_log.txt
    .
  3. Examine the .NET Core Agent log to determine why the .NET Core Agent did not start.
Symptoms
  • Secure socket errors occur when the .NET Core Agent is trying to connect to the server over HTTP/S.
  • The server refuses the HTTP/S connection to the .NET Core Agent.
Solution
The server is not accepting the .NET Core Agent Transport Layer Security (TLS) setting version, and the .NET runtime default value is not defined. Set the
agentManager.tls.versions
property so the .NET Core Agent can connect to the server over HTTP/S.
Follow these steps:
  1. Navigate to the
    <Agent_Home>
    directory and open the
    IntroscopeAgent.profile
    file in a text editor.
  2. Add the
    agentManager.tls.versions
    property to the
    IntroscopeAgent.profile
    .
    agentManager.tls.versions=
  3. Configure the
    agentManager.tls.versions
    property based on your environment. If you do not know what your .NET Core TLS version is, follow steps 3a through 3c.
    • agentManager.tls
      Values:
      default, SSL3, 1.0, 1.1, 1.2, 1.3
      Default:
      none (empty)
      Example:
      agentManager.tls.versions=default
      Note:
      No managed application restart needed.
    1. Set
      agentManager.tls.versions
      with the value of
      default.
      Then go to Step. 4.
      agentManager.tls.versions=default
    2. Configure
      agentManager.tls.versions
      to include all the version values:
      SSL3,1.0,1.2,1.3
      . Do not include the value of
      default
      . Then go to Step. 4.
      agentManager.tls.versions=SSL3,1.0,1.2,1.3
    3. If the .NET Core Agent does not connect to the Enterprise Manager, remove the oldest version value. Start with the oldest version:
      SSL3
      . Then go to Step. 4.
      In this example, the oldest TLS version, SSL3, has been removed as a value: agentManager.tls.versions=1.0,1.2,1.3
      In this example, the SSL3 and 1.0 versions have been removed as values: agentManager.tls.versions=1.2,1.3
  4. Save and close the file.
  5. Test the .NET Core Agent connection to the server.
    • If the .NET Core Agent connects to the server, you are finished.
    • If the .NET Core Agent does not connect to the server, return to Step 3 and perform Step 3b. If Step 3b does not solve the problem, go to Step 3c. Iterate Step 3c, eliminating the older versions one by one to find a compatible setting.
    • If you have iterated all the versions in Step 3c and the .NET Core Agent still does not connect to the server, contact Broadcom Support.