安装探针 SkyWalking .NET Core Agent:
dotnet add package SkyAPM.Agent.AspNetCore
设置环境变量
dotnet new mvc -n sampleapp
cd sampleapp
dotnet add package SkyAPM.Agent.AspNetCore
set ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=SkyAPM.Agent.AspNetCore
set SKYWALKING__SERVICENAME=sample_app
dotnet run
dotnet new mvc -n sampleapp
cd sampleapp
dotnet add package SkyAPM.Agent.AspNetCore
export ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=SkyAPM.Agent.AspNetCore
export SKYWALKING__SERVICENAME=sample_app
dotnet run
CLI 配置
dotnet tool install -g SkyAPM.DotNet.CLI
// your_service_name : 应用服务名,在常规服务列表可以查询到。
// your_servers: 探针数据上报端口地址,端口默认是 11800,IP 根据部署的环境而定。
dotnet skyapm config [your_service_name] [your_servers]
// 下面是一个示例
dotnet skyapm config sample_app 192.168.0.1:11800