diff --git a/pig-gateway/pom.xml b/pig-gateway/pom.xml index b33b6dba..6542fcc8 100644 --- a/pig-gateway/pom.xml +++ b/pig-gateway/pom.xml @@ -60,6 +60,11 @@ springfox-swagger-ui 2.7.0 + + + org.springframework.cloud + spring-cloud-sleuth-zipkin + diff --git a/pig-gateway/src/main/resources/bootstrap.yml b/pig-gateway/src/main/resources/bootstrap.yml index ae96fb4a..907364ff 100644 --- a/pig-gateway/src/main/resources/bootstrap.yml +++ b/pig-gateway/src/main/resources/bootstrap.yml @@ -11,7 +11,11 @@ spring: enabled: true profile: ${spring.profiles.active} label: master - + zipkin: + base-url: http://localhost:5002 + sleuth: + sampler: + percentage: 1.0 --- spring: profiles: dev diff --git a/pig-visual/pig-zipkin-elk/pom.xml b/pig-visual/pig-zipkin-elk/pom.xml index 289bffdd..13e3038a 100644 --- a/pig-visual/pig-zipkin-elk/pom.xml +++ b/pig-visual/pig-zipkin-elk/pom.xml @@ -23,6 +23,14 @@ pig-common ${pig.version} + + io.zipkin.java + zipkin-autoconfigure-ui + + + io.zipkin.java + zipkin-server + diff --git a/pig-visual/pig-zipkin-elk/src/main/java/com/github/pig/zipkin/PigZipkinElkApplication.java b/pig-visual/pig-zipkin-elk/src/main/java/com/github/pig/zipkin/PigZipkinElkApplication.java index 571bab8c..b9ade920 100644 --- a/pig-visual/pig-zipkin-elk/src/main/java/com/github/pig/zipkin/PigZipkinElkApplication.java +++ b/pig-visual/pig-zipkin-elk/src/main/java/com/github/pig/zipkin/PigZipkinElkApplication.java @@ -3,6 +3,7 @@ package com.github.pig.zipkin; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import zipkin.server.EnableZipkinServer; /** * @author lengleng @@ -11,6 +12,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient; */ @EnableDiscoveryClient @SpringBootApplication +@EnableZipkinServer public class PigZipkinElkApplication { public static void main(String[] args) {