diff --git a/customer-apigateway-service/build.gradle b/customer-apigateway-service/build.gradle index 5da757b..f1ac986 100644 --- a/customer-apigateway-service/build.gradle +++ b/customer-apigateway-service/build.gradle @@ -30,6 +30,9 @@ dependencies { implementation 'io.jsonwebtoken:jjwt:0.9.1' // https://mvnrepository.com/artifact/io.netty/netty-resolver-dns-native-macos implementation 'io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64' + // zipkin & sleuth + implementation 'org.springframework.cloud:spring-cloud-starter-sleuth' + implementation 'org.springframework.cloud:spring-cloud-starter-zipkin:2.2.3.RELEASE' implementation 'javax.xml.bind:jaxb-api:2.3.1' diff --git a/customer-apigateway-service/src/main/resources/application.yml b/customer-apigateway-service/src/main/resources/application.yml index 2f7e934..c5c4966 100644 --- a/customer-apigateway-service/src/main/resources/application.yml +++ b/customer-apigateway-service/src/main/resources/application.yml @@ -18,8 +18,17 @@ eureka: spring: application: name: customer-apigateway-service + config: import: optional:configserver:http://127.0.0.1:8888 + + zipkin: + base-url: http://127.0.0.1:9411 + enabled: true + sleuth: + sampler: + probability: 1.0 + cloud: config: name: bootstrap diff --git a/notification-service/build.gradle b/notification-service/build.gradle index a52e095..3107f2d 100644 --- a/notification-service/build.gradle +++ b/notification-service/build.gradle @@ -38,6 +38,9 @@ dependencies { implementation 'org.springframework.kafka:spring-kafka' // https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0' + // zipkin & sleuth + implementation 'org.springframework.cloud:spring-cloud-starter-sleuth' + implementation 'org.springframework.cloud:spring-cloud-starter-zipkin:2.2.3.RELEASE' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' diff --git a/notification-service/src/main/resources/application.yml b/notification-service/src/main/resources/application.yml index 0170ceb..74e6878 100644 --- a/notification-service/src/main/resources/application.yml +++ b/notification-service/src/main/resources/application.yml @@ -3,6 +3,14 @@ server.port: 0 spring: application: name: notification-service + + zipkin: + base-url: http://127.0.0.1:9411 + enabled: true + sleuth: + sampler: + probability: 1.0 + config: import: optional:configserver:http://127.0.0.1:8888 cloud: diff --git a/order-service/build.gradle b/order-service/build.gradle index a34f57a..7600711 100644 --- a/order-service/build.gradle +++ b/order-service/build.gradle @@ -32,22 +32,20 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' - /*implementation 'org.springframework.boot:spring-boot-starter-amqp'*/ - /*implementation 'org.springframework.boot:spring-boot-starter-security'*/ implementation 'org.springframework.cloud:spring-cloud-starter-config' implementation 'org.springframework.kafka:spring-kafka' // https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0' - + // zipkin & sleuth + implementation 'org.springframework.cloud:spring-cloud-starter-sleuth' + implementation 'org.springframework.cloud:spring-cloud-starter-zipkin:2.2.3.RELEASE' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'org.postgresql:postgresql' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' -// testImplementation 'org.springframework.amqp:spring-rabbit-test' testImplementation 'org.springframework.kafka:spring-kafka-test' -// testImplementation 'org.springframework.security:spring-security-test' testImplementation 'com.h2database:h2' testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc' diff --git a/order-service/src/main/resources/application.yml b/order-service/src/main/resources/application.yml index e87c9d1..fa2467a 100644 --- a/order-service/src/main/resources/application.yml +++ b/order-service/src/main/resources/application.yml @@ -4,6 +4,14 @@ server: spring: application: name: order-service + + zipkin: + base-url: http://127.0.0.1:9411 + enabled: true + sleuth: + sampler: + probability: 1.0 + config: import: optional:configserver:http://127.0.0.1:8888 cloud: @@ -25,7 +33,6 @@ spring: username: postgres password: admin - eureka: client: service-url: diff --git a/owner-apigateway-service/build.gradle b/owner-apigateway-service/build.gradle index e1079c0..1ee08e5 100644 --- a/owner-apigateway-service/build.gradle +++ b/owner-apigateway-service/build.gradle @@ -33,6 +33,9 @@ dependencies { // https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api implementation 'javax.xml.bind:jaxb-api:2.3.1' implementation 'org.springframework.cloud:spring-cloud-starter-config' + // zipkin & sleuth + implementation 'org.springframework.cloud:spring-cloud-starter-sleuth' + implementation 'org.springframework.cloud:spring-cloud-starter-zipkin:2.2.3.RELEASE' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' diff --git a/owner-apigateway-service/src/main/resources/application.yml b/owner-apigateway-service/src/main/resources/application.yml index 561969a..f15b064 100644 --- a/owner-apigateway-service/src/main/resources/application.yml +++ b/owner-apigateway-service/src/main/resources/application.yml @@ -15,10 +15,17 @@ spring: default: dev config: import: optional:configserver:http://127.0.0.1:8888 + + zipkin: + base-url: http://127.0.0.1:9411 + enabled: true + sleuth: + sampler: + probability: 1.0 + cloud: config: name: bootstrap - gateway: default-filters: - name: GlobalFilter diff --git a/store-service/build.gradle b/store-service/build.gradle index d588e29..8f5010d 100644 --- a/store-service/build.gradle +++ b/store-service/build.gradle @@ -38,6 +38,9 @@ dependencies { /*implementation 'org.springframework.kafka:spring-kafka'*/ // https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0' + // zipkin & sleuth + implementation 'org.springframework.cloud:spring-cloud-starter-sleuth' + implementation 'org.springframework.cloud:spring-cloud-starter-zipkin:2.2.3.RELEASE' compileOnly 'org.projectlombok:lombok' diff --git a/store-service/src/main/resources/application.yml b/store-service/src/main/resources/application.yml index c66a93b..260984d 100644 --- a/store-service/src/main/resources/application.yml +++ b/store-service/src/main/resources/application.yml @@ -4,6 +4,14 @@ server: spring: application: name: store-service + + zipkin: + base-url: http://127.0.0.1:9411 + enabled: true + sleuth: + sampler: + probability: 1.0 + config: import: optional:configserver:http://127.0.0.1:8888 cloud: @@ -27,13 +35,6 @@ spring: username: postgres password: admin - -# sql: -# init: -# data-locations: classpath:data/data.sql -# mode: always - - eureka: client: service-url: diff --git a/user-service/build.gradle b/user-service/build.gradle index 8fd3d9d..bfb7a73 100644 --- a/user-service/build.gradle +++ b/user-service/build.gradle @@ -39,6 +39,9 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-config' /*implementation 'org.springframework.kafka:spring-kafka'*/ implementation 'org.springframework.boot:spring-boot-starter-data-redis' + // zipkin & sleuth + implementation 'org.springframework.cloud:spring-cloud-starter-sleuth' + implementation 'org.springframework.cloud:spring-cloud-starter-zipkin:2.2.3.RELEASE' // https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0' diff --git a/user-service/src/main/resources/application.yml b/user-service/src/main/resources/application.yml index a156c8a..03b6b99 100644 --- a/user-service/src/main/resources/application.yml +++ b/user-service/src/main/resources/application.yml @@ -4,6 +4,13 @@ spring: application: name: user-service + zipkin: + base-url: http://127.0.0.1:9411 + enabled: true + sleuth: + sampler: + probability: 1.0 + config: import: optional:configserver:http://127.0.0.1:8888 cloud: