diff --git a/.gitignore b/.gitignore index e10e727..dc7a6d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /.metadata/ +zipkin-server-2.23.18-exec.jar \ No newline at end of file diff --git a/bike-service/pom.xml b/bike-service/pom.xml index 1985160..2880978 100644 --- a/bike-service/pom.xml +++ b/bike-service/pom.xml @@ -54,6 +54,14 @@ org.springframework.cloud spring-cloud-starter-netflix-eureka-client + + org.springframework.cloud + spring-cloud-sleuth-zipkin + + + org.springframework.cloud + spring-cloud-starter-sleuth + diff --git a/car-service/pom.xml b/car-service/pom.xml index 3fbe4a1..b30702c 100644 --- a/car-service/pom.xml +++ b/car-service/pom.xml @@ -54,6 +54,14 @@ org.springframework.cloud spring-cloud-starter-netflix-eureka-client + + org.springframework.cloud + spring-cloud-sleuth-zipkin + + + org.springframework.cloud + spring-cloud-starter-sleuth + diff --git a/config-data/bike-service.yml b/config-data/bike-service.yml index 75deb71..e4ac8f1 100644 --- a/config-data/bike-service.yml +++ b/config-data/bike-service.yml @@ -7,4 +7,7 @@ eureka: service-url: default-zone: http://localhost:8761/eureka instance: - instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}} \ No newline at end of file + instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}} +spring: + application: + zipkin: http://localhost:9411 \ No newline at end of file diff --git a/config-data/car-service.yml b/config-data/car-service.yml index 75deb71..e4ac8f1 100644 --- a/config-data/car-service.yml +++ b/config-data/car-service.yml @@ -7,4 +7,7 @@ eureka: service-url: default-zone: http://localhost:8761/eureka instance: - instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}} \ No newline at end of file + instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}} +spring: + application: + zipkin: http://localhost:9411 \ No newline at end of file diff --git a/config-data/user-service.yml b/config-data/user-service.yml index 35f297e..6383085 100644 --- a/config-data/user-service.yml +++ b/config-data/user-service.yml @@ -36,4 +36,7 @@ resilience4j.circuitbreaker: minimumNumberOfCalls: 4 waitDurationInOpenState: 5s failureRateThreshold: 50 - eventConsumerBufferSize: 10 \ No newline at end of file + eventConsumerBufferSize: 10 +spring: + application: + zipkin: http://localhost:9411 \ No newline at end of file diff --git a/config-service/src/main/resources/application.yaml b/config-service/src/main/resources/application.yaml index ba678fb..d39e9e6 100644 --- a/config-service/src/main/resources/application.yaml +++ b/config-service/src/main/resources/application.yaml @@ -5,7 +5,7 @@ spring: config: server: git: - defaultLabel: circuit-breaker + defaultLabel: zipkin-sleuth uri: https://git.gzcode.xyz/atancito/MicroservicesTutorial searchPaths: config-data application: diff --git a/user-service/pom.xml b/user-service/pom.xml index 77aee29..474736e 100644 --- a/user-service/pom.xml +++ b/user-service/pom.xml @@ -70,7 +70,14 @@ spring-boot-starter-aop 2.7.4 - + + org.springframework.cloud + spring-cloud-sleuth-zipkin + + + org.springframework.cloud + spring-cloud-starter-sleuth +