@@ -17,7 +17,7 @@ service1 makes an API call to service2 before returning a response.
17
17
The three containers will be deployed inside a virtual network called ``envoymesh ``.
18
18
19
19
All incoming requests are routed via the front Envoy, which is acting as a reverse proxy
20
- sitting on the edge of the ``envoymesh `` network. Port ``8000 `` is exposed
20
+ sitting on the edge of the ``envoymesh `` network. Port ``10000 `` is exposed
21
21
by docker compose (see :download: `docker-compose.yaml <_include/jaeger-tracing/docker-compose.yaml >`). Notice that
22
22
all Envoys are configured to collect request traces (e.g., http_connection_manager/config/tracing setup in
23
23
:download: `envoy.yaml <_include/jaeger-tracing/envoy.yaml >`) and setup to propagate the spans generated
@@ -48,13 +48,11 @@ To build this sandbox example, and start the example apps run the following comm
48
48
$ docker compose pull
49
49
$ docker compose up --build -d
50
50
$ docker compose ps
51
-
52
- Name Command State Ports
53
- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
54
- jaeger-tracing_front-envoy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8000->8000/tcp
55
- jaeger-tracing_jaeger_1 /go/bin/all-in-one-linux - ... Up 14250/tcp, 14268/tcp, 0.0.0.0:16686->16686/tcp, 5775/udp, 5778/tcp, 6831/udp, 6832/udp, 9411/tcp
56
- jaeger-tracing_service1_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp
57
- jaeger-tracing_service2_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp
51
+ NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
52
+ jaeger-tracing-front-envoy-1 jaeger-tracing-front-envoy "/docker-entrypoint.…" front-envoy 43 seconds ago Up 20 seconds 0.0.0.0:10000->10000/tcp
53
+ jaeger-tracing-jaeger-1 jaeger-tracing-jaeger "/go/bin/all-in-one-…" jaeger 43 seconds ago Up 25 seconds (healthy) 4317-4318/tcp, 5775/udp, 5778/tcp, 9411/tcp, 14250/tcp, 14268/tcp, 6831-6832/udp, 0.0.0.0:16686->16686/tcp
54
+ jaeger-tracing-service1-1 jaeger-tracing-service1 "/usr/local/bin/star…" service1 43 seconds ago Up 42 seconds (healthy)
55
+ jaeger-tracing-service2-1 jaeger-tracing-service2 "/usr/local/bin/star…" service2 43 seconds ago Up 42 seconds (healthy)
58
56
59
57
Step 2: Generate some load
60
58
**************************
@@ -63,23 +61,28 @@ You can now send a request to service1 via the front-envoy as follows:
63
61
64
62
.. code-block :: console
65
63
66
- $ curl -v localhost:8000/trace/1
67
- * Trying 192.168.99.100...
68
- * Connected to 192.168.99.100 (192.168.99.100) port 8000 (#0)
64
+ $ curl -v localhost:10000/trace/1
65
+ curl -v localhost:10000/trace/1
66
+ * Host localhost:10000 was resolved.
67
+ * IPv6: ::1
68
+ * IPv4: 127.0.0.1
69
+ * Trying [::1]:10000...
70
+ * Connected to localhost (::1) port 10000
69
71
> GET /trace/1 HTTP/1.1
70
- > Host: 192.168.99.100:8000
71
- > User-Agent: curl/7.54 .0
72
+ > Host: localhost:10000
73
+ > User-Agent: curl/8.6 .0
72
74
> Accept: */*
73
75
>
74
76
< HTTP/1.1 200 OK
75
- < content-type: text/html ; charset=utf-8
76
- < content-length: 89
77
- < x-envoy-upstream-service-time: 9
77
+ < content-type: text/plain ; charset=utf-8
78
+ < content-length: 79
79
+ < date: Wed, 06 Nov 2024 17:06:59 GMT
78
80
< server: envoy
79
- < date: Fri, 26 Aug 2018 19:39:19 GMT
81
+ < x-envoy-upstream-service-time: 37
80
82
<
81
- Hello from behind Envoy (service 1)! hostname: f26027f1ce28 resolvedhostname: 172.19.0.6
82
- * Connection #0 to host 192.168.99.100 left intact
83
+ Hello from behind Envoy (service 1)! hostname 1445fe2bbcb3 resolved 172.20.0.4
84
+ * Connection #0 to host localhost left intact
85
+
83
86
84
87
Step 3: View the traces in Jaeger UI
85
88
************************************
@@ -89,6 +92,10 @@ Set the service to "front-proxy" and hit 'Find Traces'. You should see traces fr
89
92
Click on a trace to explore the path taken by the request from front-proxy to service1
90
93
to service2, as well as the latency incurred at each hop.
91
94
95
+ The trace should look similar to the image below:
96
+
97
+ .. image :: /start/sandboxes/_include/jaeger-tracing/_static/jaeger_tracing.png
98
+
92
99
.. seealso ::
93
100
94
101
:ref: `Request tracing <arch_overview_tracing >`
0 commit comments