From 6244c4e10c90b68d0b40ac01ff00fe4cde33b254 Mon Sep 17 00:00:00 2001 From: Jason Richard Smith Date: Mon, 2 Jan 2017 15:20:29 +0100 Subject: [PATCH] added some basics for zipkin openmtracing --- docker-compose-zipkin.yml | 36 +++++++++++++++++++++++ pom.xml | 5 ++++ src/main/resources/application.properties | 3 ++ 3 files changed, 44 insertions(+) create mode 100644 docker-compose-zipkin.yml diff --git a/docker-compose-zipkin.yml b/docker-compose-zipkin.yml new file mode 100644 index 0000000..6e660c1 --- /dev/null +++ b/docker-compose-zipkin.yml @@ -0,0 +1,36 @@ +version: '2' + +services: + shipping: + image: weaveworksdemos/shipping + hostname: shipping + restart: always + cap_drop: + - all + cap_add: + - NET_BIND_SERVICE + read_only: true + tmpfs: + - /tmp:rw,noexec,nosuid + environment: + - reschedule=on-node-failure + - ZIPKIN=zipkin + ports: + - "8080:80" + zipkin: + image: openzipkin/zipkin + hostname: zipkin + restart: always + cap_drop: + - all + cap_add: + - CHOWN + - SETGID + - SETUID + read_only: true + tmpfs: + - /tmp:rw,noexec,nosuid + environment: + - reschedule=on-node-failure + ports: + - "9411:9411" diff --git a/pom.xml b/pom.xml index b9b7a16..3da5a30 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,11 @@ org.springframework.boot spring-boot-starter-actuator + + org.springframework.cloud + spring-cloud-starter-zipkin + 1.1.0.RELEASE + io.prometheus simpleclient diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 77d83ef..bda9f69 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,2 +1,5 @@ server.port=${port:8080} endpoints.health.enabled=false +spring.zipkin.baseUrl=http://${zipkin:zipkin}:9411/ +spring.sleuth.sampler.percentage=1.0 +spring.application.name=shipping