All Products
Search
Document Center

Application Real-Time Monitoring Service:Report .NET application data with SkyWalking

Last Updated:Mar 11, 2026

The SkyWalking .NET Core agent (SkyAPM) automatically instruments supported .NET frameworks. After you install and configure the agent, it reports distributed traces to the Managed Service for OpenTelemetry console.

This guide covers three steps:

  1. Get the SkyWalking endpoint from the ARMS console.

  2. Install and configure the SkyAPM agent in your .NET project.

  3. Verify that trace data appears in the console.

Background information

SkyWalking is a popular application performance monitoring (APM) service developed in China. SkyWalking is designed for microservices, cloud-native architectures, and container-based architectures such as Docker, Kubernetes, and Mesos. SkyWalking is also a distributed tracing system.

Prerequisites

Get the SkyWalking endpoint and authentication token from the ARMS console:

  1. Log on to the Managed Service for OpenTelemetry console.

  2. In the left-side navigation pane, click Cluster Configurations. Then, click the Access point information tab.

  3. In the top navigation bar, select a region. In the Cluster Information section, turn on Show Token.

  4. In the Client section, click SkyWalking.

  5. Copy the endpoint and token from the Related Information column.

    SkyWalking endpoint information

If your application is deployed in an Alibaba Cloud production environment, use a VPC endpoint. Otherwise, use a public endpoint.

Install the agent

From the root directory of your .NET project, install the SkyAPM NuGet package and set the required environment variables:

# Install the SkyAPM agent package
dotnet add package SkyAPM.Agent.AspNetCore

# Set the required environment variables
export ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=SkyAPM.Agent.AspNetCore
export SKYWALKING__SERVICENAME=<your-service-name>

Replace <your-service-name> with a name that identifies your application in the ARMS console (for example, my-dotnet-app).

Configure the agent

Create a skyapm.json configuration file to specify the reporting endpoint. Choose one of the following methods:

Method 1: Generate with CLI tool

Install the SkyAPM CLI tool and generate the configuration file:

# Install the CLI tool
dotnet tool install -g SkyAPM.DotNet.CLI

# Add the tool to your PATH (replace /path/to with the actual path to your .dotnet directory)
export PATH="$PATH:/path/to/.dotnet/tools/"

# Generate skyapm.json
dotnet skyapm config <your-service-name> <your-endpoint>

Method 2: Create manually

Create a skyapm.json file in the root directory of your .NET project with the following content:

{
  "SkyWalking": {
    "ServiceName": "<your-service-name>",
    "Namespace": "",
    "HeaderVersions": [
      "sw8"
    ],
    "Sampling": {
      "SamplePer3Secs": -1,
      "Percentage": -1.0,
      "LogSqlParameterValue": false
    },
    "Logging": {
      "Level": "Information",
      "FilePath": "logs/skyapm-{Date}.log"
    },
    "Transport": {
      "Interval": 3000,
      "ProtocolVersion": "v8",
      "QueueSize": 30000,
      "BatchSize": 3000,
      "gRPC": {
        "Servers": "<your-endpoint>",
        "Authentication": "<your-token>",
        "Timeout": 100000,
        "ConnectTimeout": 100000,
        "ReportTimeout": 600000
      }
    }
  }
}

Replace the following placeholders with your actual values:

PlaceholderDescription
<your-service-name>The application name displayed in the ARMS console.
<your-endpoint>The SkyWalking endpoint copied in the Prerequisites section.
<your-token>The authentication token copied in the Prerequisites section.

Configuration parameters

Required parameters

ParameterDescription
ServiceNameThe application name displayed in the ARMS console.
gRPC.ServersThe SkyWalking endpoint from the ARMS console.
gRPC.AuthenticationThe authentication token from the ARMS console.

Optional parameters

ParameterDescription
SamplePer3SecsThe number of trace samples collected every 3 seconds.
PercentageThe sampling percentage. For example, 10 means 10%.
Logging.LevelLog level for the agent's own logs. Used for debugging.
Logging.FilePathPath and file name pattern for agent log files.

Start the application and verify

  1. Start (or restart) your .NET application:

    dotnet run
  2. Send a few requests to your application to generate trace data.

  3. Log on to the Managed Service for OpenTelemetry console and check whether trace data appears.

Troubleshoot with agent logs

If no trace data appears in the console, check the agent log file at logs/skyapm-<date>.log in your project directory. This file records connection attempts, errors, and data reporting activity.

Agent log output

Supported frameworks

Build the agent from source (optional)

To build the SkyAPM .NET agent from source code:

# Clone the source repository
git clone https://github.com/SkyAPM/SkyAPM-dotnet.git

# Navigate to the project root
cd SkyAPM-dotnet/

# Check out the desired version tag
git checkout <tag-name>

# Initialize and update submodules
git submodule init
git submodule update

# Restore dependencies and build
dotnet restore
dotnet build src/SkyApm.Transport.Grpc.Protocol
dotnet build skyapm-dotnet.sln

Sample code

For a complete working example, see the skywalking-demo repository on GitHub.

FAQ

The dotnet skyapm config command fails to generate skyapm.json. How do I fix this?

CLI tool error

Try one of the following solutions:

  • Create skyapm.json manually (recommended): The CLI tool only generates the configuration file. Follow the instructions in Method 2: Create manually to create the file and configure the required parameters directly.

  • Switch to .NET 6.0: The CLI tool may not be compatible with your current .NET version. Install and use .NET 6.0 to run the CLI tool.