feat:新增链路追踪

dev
gtl 2024-05-19 17:02:14 +08:00
parent c783f979d8
commit ae42198a13
6 changed files with 61 additions and 0 deletions

View File

@ -52,6 +52,18 @@
<artifactId>muyu-common-security</artifactId> <artifactId>muyu-common-security</artifactId>
</dependency> </dependency>
<!-- SpringCloud Sleuth -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<!-- SpringCloud Zipkin -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
<version>2.2.8.RELEASE</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -25,3 +25,11 @@ spring:
# 共享配置 # 共享配置
shared-configs: shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#配置zipkin
zipkin:
base-url: http://127.0.0.1:9411
# 不要让nacos把zipkin注册进去可以不写
discovery-client-enabled: false
sleuth:
sampler:
probability: 1.0

View File

@ -88,6 +88,19 @@
<version>${swagger.fox.version}</version> <version>${swagger.fox.version}</version>
</dependency> </dependency>
<!-- SpringCloud Sleuth -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<!-- SpringCloud Zipkin -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
<version>2.2.8.RELEASE</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -41,3 +41,11 @@ spring:
groupId: DEFAULT_GROUP groupId: DEFAULT_GROUP
data-type: json data-type: json
rule-type: gw-flow rule-type: gw-flow
#配置zipkin
zipkin:
base-url: http://127.0.0.1:9411
# 不要让nacos把zipkin注册进去可以不写
discovery-client-enabled: false
sleuth:
sampler:
probability: 1.0

View File

@ -78,6 +78,18 @@
<artifactId>muyu-common-swagger</artifactId> <artifactId>muyu-common-swagger</artifactId>
</dependency> </dependency>
<!-- SpringCloud Sleuth -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<!-- SpringCloud Zipkin -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
<version>2.2.8.RELEASE</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -25,6 +25,14 @@ spring:
# 共享配置 # 共享配置
shared-configs: shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#配置zipkin
zipkin:
base-url: http://127.0.0.1:9411
# 不要让nacos把zipkin注册进去可以不写
discovery-client-enabled: false
sleuth:
sampler:
probability: 1.0
logging: logging:
level: level:
com.ruoyi.system.mapper: DEBUG com.ruoyi.system.mapper: DEBUG