官方下载地址 Downloads | Apache SkyWalking
jdk 12.2
解压 找到 bin/startup目录 启动,不连接数据库,采用内存记录 webapp\application.yml 可以更改 web程序启动端口 config\application.yml 更改配置,具体百度 上面这两个可以 默认设置,不更改
启动后界面
然后Net 6创建项目 ,添加包 skyapm.agent.aspnetcore.2.1.0
更改launchSettings.json
{ "$schema": "https://json.schemastore.org/launchsettings.json", "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { "applicationUrl": "http://localhost:1533", "sslPort": 44385 } }, "profiles": { "Skywalking_1": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "swagger", "applicationUrl": "https://localhost:7198;http://localhost:5229", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development", "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "SkyAPM.Agent.AspNetCore", //必须配置 "SKYWALKING__SERVICENAME": "Service1" // 必须配置,在skywalking做标识,服务名称 } }, "IIS Express": { "commandName": "IISExpress", "launchBrowser": true, "launchUrl": "swagger", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development", "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "SkyAPM.Agent.AspNetCore", //必须配置 "SKYWALKING__SERVICENAME": "Service1" // 必须配置,在skywalking做标识,服务名称 } } } }
添加skywalking.json
{ "SkyWalking": { "ServiceName": "Service1", "Namespace": "", "HeaderVersions": [ "sw8" ], "Sampling": { "SamplePer3Secs": -1, "Percentage": -1.0 }, "Logging": { "Level": "Information", "FilePath": "logs\\skyapm-{Date}.log" }, "Transport": { "Interval": 3000, "ProtocolVersion": "v8", "QueueSize": 30000, "BatchSize": 3000, "gRPC": { "Servers": "http://localhost:11800", //"192.168.101.10:11800", "Timeout": 10000, "ConnectTimeout": 10000, "ReportTimeout": 600000, "Authentication": "" } } } }
Porgram.cs添加 builder.Services.AddSkyApmExtensions();
效果图
没数据等会,或者找到设置打开自动更新
标签:SkyDotNet,ASPNETCORE,json,9.5,Net6,Skywalking,true,Service1,localhost From: https://www.cnblogs.com/liujian1368928/p/17668353.html