.NET微服务从0到1:APM(SkyWalking )
作者:互联网
文章目录
Skywalking
Skywalking是一个用Java
编写的APM系统,为应用程序提供的监视、跟踪和诊断等功能。
安装配置
version: '3.3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
container_name: elasticsearch
restart: always
ports:
- 9200:9200
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
oap:
image: apache/skywalking-oap-server:7.0.0-es7
container_name: oap
depends_on:
- elasticsearch
links:
- elasticsearch
restart: always
ports:
- 11800:11800
- 12800:12800
environment:
SW_STORAGE: elasticsearch7
SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
ui:
image: apache/skywalking-ui:7.0.0
container_name: ui
depends_on:
- oap
links:
- oap
restart: always
ports:
- 8080:8080
environment:
SW_OAP_ADDRESS: oap:12800
对ASP.NET Core 应用的支持
首先需要安装nuget包
Install-Package SkyAPM.Agent.AspNetCore -Version 0.9.0
.NET客户端代理库使用SkyAPM-dotnet
配置环境变量
“ASPNETCORE_HOSTINGSTARTUPASSEMBLIES”: “SkyAPM.Agent.AspNetCore”
Skywalking配置
- 安装客户端工具
dotnet tool install -g SkyAPM.DotNet.CLI
- 添加配置文件
dotnet skyapm config YourServiceName localhost:11800
运行起来,在仪表板出可以看到服务的一些性能指标
在拓扑图这里,我们可以看到服务的依赖关系
在追踪这里,我们可以看到接口的调用链
标签:Skywalking,SkyAPM,APM,elasticsearch,oap,NET,SkyWalking,9200 来源: https://blog.csdn.net/zhaobw831/article/details/105932607