-
Notifications
You must be signed in to change notification settings - Fork 0
/
tracing_mp.sh
executable file
·52 lines (40 loc) · 1.18 KB
/
tracing_mp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# Include the magic
. demo/demo-magic/demo-magic.sh
# Configure the options
DEMO_PROMPT='TracingMP$ '
NO_WAIT=false
TYPE_SPEED=20
# Clear screen
clear
# Run Zipkin in docker
pe "docker run -d -p 9411:9411 openzipkin/zipkin"
# Open Zipkin console
pe "open http://localhost:9411/zipkin/"
wait
echo
echo -e "${BLUE}1. Add dependencies${COLOR_RESET}"
echo -e "${WHITE}"
echo "<dependency>"
echo " <groupId>io.helidon.microprofile.tracing</groupId>"
echo " <artifactId>helidon-microprofile-tracing</artifactId>"
echo "</dependency>"
echo "<dependency>"
echo " <groupId>io.helidon.tracing</groupId>"
echo " <artifactId>helidon-tracing-zipkin</artifactId>"
echo "</dependency>"
echo -e "${RESET_COLOR}"
echo -e "${BLUE}2. Add service name to microprofile-config.properties${COLOR_RESET}"
echo -e "${WHITE}"
echo "tracing.service=helidon-mp"
echo -e "${RESET_COLOR}"
wait
NO_WAIT=true
TYPE_SPEED=""
pe "curl -X GET http://localhost:8080/greet"
pe "curl -X GET http://localhost:8080/greet/Joe"
pe "curl -X GET http://localhost:8080/greet"
pe "curl -X GET http://localhost:8080/greet/Tomas"
pe "curl -X GET http://localhost:8080/greet"
NO_WAIT=false
pe "open http://localhost:9411/zipkin/"