springcloud-分布式请求链路追踪Sleuth(十一)
2021-04-26 07:27
标签:ppi 哪些 https str dep 提供者 (十一) 客户端 int springcloud-分布式请求链路追踪Sleuth(十一) 标签:ppi 哪些 https str dep 提供者 (十一) 客户端 int 原文地址:https://www.cnblogs.com/binwenhome/p/13254111.html概述
搭建链路监控步骤
dependency>
groupId>org.springframework.cloudgroupId>
artifactId>spring-cloud-starter-zipkinartifactId>
dependency>
@GetMapping("/payment/zipkin ")
public String paymentZipkin() {
return "Hi, I am paymentZipkin server fall back";
}
dependency>
groupId>org.springframework.cloudgroupId>
artifactId>spring-cloud-starter-zipkinartifactId>
dependency>
spring:
application:
name: cloud-order-service
zipkin:
base-url: http://localhost:9411
sleuth:
sampler:
probability: 1
@GetMapping("/consumer/payment/zipkin")
public String paymentZipkin() {
String result = restTemplate.getForObject("http://localhost:8001" + "/payment/zipkin/", String.class);
return result;
}
文章标题:springcloud-分布式请求链路追踪Sleuth(十一)
文章链接:http://soscw.com/index.php/essay/79710.html