YueKi WiKi

个人维基百科与知识管理

用户工具

站点工具


服务器:ocelot

加入 consul 发现

"DownstreamPathTemplate": "/{url}",
"UpstreamPathTemplate": "/pap/{url}",
"UpstreamHttpMethod": [ "Post", "Get" ],
"DownstreamScheme": "http",
"ServiceName": "服务名称",
"UseServiceDiscovery": true // 启用发现
"GlobalConfiguration": {
    "ServiceDiscoveryProvider": {
      "Host": "127.0.0.1",
      "Port": 8500,
      "Type": "Consul",
      "PollingInterval":  1000
    }
  }

加入 SKYWALKING

skyapm.json

{
  "SkyWalking": {
    "ServiceName": "YLAWAY",
    "Namespace": "",
    "HeaderVersions": [
      "sw6"
    ],
    "Sampling": {
      "SamplePer3Secs": -1,
      "Percentage": -1.0
    },
    "Logging": {
      "Level": "Information",
      "FilePath": "logs/skyapm-{Date}.log"
    },
    "Transport": {
      "Interval": 3000,
      "ProtocolVersion": "v6",
      "QueueSize": 30000,
      "BatchSize": 3000,
      "gRPC": {
        "Servers": "127.0.0.1:11800",
        "Timeout": 10000,
        "ConnectTimeout": 10000,
        "ReportTimeout": 600000
      }
    }
  }
}

启动环境变量

launchSettings.json

{
  "profiles": {
    "YLAWAY": {
      "commandName": "Project",
      "environmentVariables": {
        "SKYWALKING__SERVICENAME": "YLAWAY",
        "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "SkyAPM.Agent.AspNetCore"
      }
    }
  }
}