Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit a5785ab

Browse files
Merge pull request #18 from microservices-demo/enhancement/opentracing
Enhancement/opentracing
2 parents a51f183 + 3e36f3b commit a5785ab

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

docker-compose-zipkin.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: '2'
2+
3+
services:
4+
carts:
5+
image: weaveworksdemos/carts
6+
hostname: carts
7+
restart: always
8+
cap_drop:
9+
- all
10+
cap_add:
11+
- NET_BIND_SERVICE
12+
read_only: true
13+
tmpfs:
14+
- /tmp:rw,noexec,nosuid
15+
environment:
16+
- reschedule=on-node-failure
17+
- ZIPKIN=zipkin
18+
ports:
19+
- "8081:80"
20+
zipkin:
21+
image: openzipkin/zipkin
22+
hostname: zipkin
23+
restart: always
24+
cap_drop:
25+
- all
26+
cap_add:
27+
- CHOWN
28+
- SETGID
29+
- SETUID
30+
read_only: true
31+
tmpfs:
32+
- /tmp:rw,noexec,nosuid
33+
environment:
34+
- reschedule=on-node-failure
35+
ports:
36+
- "9411:9411"

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
<groupId>org.springframework.boot</groupId>
3636
<artifactId>spring-boot-starter-actuator</artifactId>
3737
</dependency>
38+
<dependency>
39+
<groupId>org.springframework.cloud</groupId>
40+
<artifactId>spring-cloud-starter-zipkin</artifactId>
41+
<version>1.1.0.RELEASE</version>
42+
</dependency>
3843
<dependency>
3944
<groupId>io.prometheus</groupId>
4045
<artifactId>simpleclient</artifactId>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
server.port=${port:8081}
22
spring.data.mongodb.uri=mongodb://${db:cart-db}:27017/data
33
endpoints.health.enabled=false
4+
spring.zipkin.baseUrl=http://${zipkin:zipkin}:9411/
5+
spring.sleuth.sampler.percentage=1.0
6+
spring.application.name=carts

0 commit comments

Comments
 (0)