You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Access serivce_blue and check if green background page is displayed. It is expected that nothting special will occur.
65
65
66
66
```sh
67
-
$ curl -s http://localhost:8000/service/green
67
+
curl -s http://localhost:8000/service/green
68
68
```
69
69
70
70
Try paralell access to service_green. It is expected that nothting special will occur. The following helper command allow you to send parallel requests repeatedly (For example, send 5 parallel requests to http://localhost:8000/service/green, each thread make 30 consequent requests).
Access serivce_blue and check if 50% of requests to service_blue are 10 seconds delayed. The following helper command allow you to send requests repeatedly (For example, send 10 requests to http://localhost:8000/service/blue).
Sending GET request: http://localhost:8000/service/blue
82
82
200
@@ -88,7 +88,7 @@ Sending GET request: http://localhost:8000/service/blue
88
88
Access serivce_red and check if 50% of requests to service_red are aborted with 503 HTTP status code. The following helper command allow you to send requests repeatedly (For example, send 10 requests to http://localhost:8000/service/red).
Copy file name to clipboardExpand all lines: jaeger-tracing/README.md
+85-48Lines changed: 85 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
# Distributed Tracing: Jaeger Tracing
2
2
3
3
## Demo Overview
4
-
This is a Jaeger tracing example built based on the [Envoy sandboxes (Jaeger Tracing)](https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/jaeger_tracing) that demonstrates Envoy’s [tracing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/tracing#arch-overview-tracing) capabilities using [Jaeger](https://www.jaegertracing.io/) as the tracing provider.
4
+
This is a Jaeger tracing example built based on the [Envoy sandboxes (Jaeger Tracing)](https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/jaeger_tracing) that demonstrates Envoy’s [tracing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/observability/tracing) capabilities using [Jaeger](https://www.jaegertracing.io/) as the tracing provider.
5
5
6
-
All services in the demo support not only `service` endpoint (which is basically the same as [HTTP Routing: Simple Match Routing](../httproute-simple-match/README.md)) but also `trace` endpoint. All traffic is routed by the `front envoy` to the `service containers`. Internally the traffic is routed to the service envoys, then the service envoys route the request to the flask app via the loopback address. All trace data is collected into a `Jaeger` container.
6
+
All services in the demo support not only `service` endpoint (which is basically the same as [HTTP Routing: Simple Match Routing](../httproute-simple-match/README.md)) but also `trace` endpoint. All traffic is routed from the `front envoy` to the `service containers`. Internally the traffic is routed to the service envoys, then the service envoys route the request to the flask app via the loopback address. All trace data is collected into a `Jaeger` container.
7
7
8
8

9
9
@@ -19,51 +19,89 @@ In accessing to `trace` endpoint, all traffic is routed to the service envoys wi
19
19

20
20
21
21
#### Key configuration 1: The HTTP connection manager
22
-
All envoys are configured to collect request traces (e.g., http_connection_manager/config/tracing setup in front envoy).
23
-
```
24
-
- filters:
25
-
- name: envoy.http_connection_manager
26
-
config:
27
-
tracing:
28
-
operation_name: egress
22
+
All envoys are configured to collect request traces (e.g., [tracing](https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#envoy-api-msg-config-filter-network-http-connection-manager-v2-httpconnectionmanager-tracing) in config.filter.network.http_connection_manager.v2.HttpConnectionManager in front envoy).
> - The HTTP connection manager that handles the request must have the tracing object set. Please refer to [tracing object](https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#envoy-api-msg-config-filter-network-http-connection-manager-v2-httpconnectionmanager-tracing).
31
-
> -`operation_name`: The span name will be derived from this field (`ingress` or `egress`)
32
-
> -`ingress` (default): The HTTP listener is used for ingress/incoming requests.
33
-
> -`egress`: The HTTP listener is used for egress/outgoing requests
48
+
> - For the configuration for an HTTP tracer provider used by Envoy, see [config.trace.v2.Tracing.Http](https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/trace/v2/http_tracer.proto#envoy-api-msg-config-trace-v2-tracing-http)
49
+
>
50
+
51
+
> Presence of the object defines whether the connection manager emits tracing data to the configured tracing provider. You configure `tracing driver` in `name` field. Here are 4 parameter options for `tracing driver` and `envoy.tracers.zipkin` is selected here:
52
+
> - envoy.tracers.lightstep
53
+
> - envoy.tracers.zipkin
54
+
> - envoy.tracers.dynamic_ot
55
+
> - envoy.tracers.datadog
56
+
> - envoy.tracers.opencensus
57
+
> - envoy.tracers.xray
58
+
>
59
+
> Parameters for Config parts in zipkin deiver are [here](https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/trace/v2/zipkin.proto#envoy-api-msg-config-trace-v2-zipkinconfig)
> Presence of the object defines whether the connection manager emits tracing data to the configured tracing provider. You configure `tracing driver` in `name` field. Here are 4 parameter options for `tracing driver` and `envoy.zipkin` is selected here:
61
-
> - envoy.lightstep
62
-
> - envoy.zipkin
63
-
> - envoy.dynamic.ot
64
-
> - envoy.tracers.datadog
65
-
66
-
> Parameters for Config parts in zipkin deiver are [here](https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/trace/v2/trace.proto#envoy-api-msg-config-trace-v2-zipkinconfig)
One of the most important benefits of tracing from Envoy is that it will take care of propagating the traces to the Jaeger service cluster. However, in order to fully take advantage of tracing, the application has to propagate trace headers that Envoy generates. The sample `trace header propagations` setup in servcie application code ([apps/service.py](../apps/service.py)) is this:
jaeger-tracing_service_blue_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 80/tcp
194
+
jaeger-tracing_service_green_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 80/tcp
195
+
jaeger-tracing_service_red_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 80/tcp
159
196
```
160
197
161
198
### Access each services and check tracing results
162
199
163
200
Access the following 3 endpoints for tracing test.
164
201
```
165
-
$ curl -s -v http://localhost:8000/trace/blue
166
-
$ curl -s -v http://localhost:8000/trace/green
167
-
$ curl -s -v http://localhost:8000/trace/red
202
+
curl -s -v http://localhost:8000/trace/blue
203
+
curl -s -v http://localhost:8000/trace/green
204
+
curl -s -v http://localhost:8000/trace/red
168
205
```
169
206
170
207
For example, when you access `/trace/blue`, you'll see the following output
171
208
```sh
172
-
$ curl -s -v http://localhost:8000/trace/blue
209
+
curl -s -v http://localhost:8000/trace/blue
173
210
174
211
* Trying ::1...
175
212
* TCP_NODELAY set
@@ -195,7 +232,7 @@ Hello from blue (hostname: 9f71b1513720 resolvedhostname:172.21.0.5)
195
232
Trace data would automatically have been generated and pushed to Jaeger via Envoy. In this part, check the Jaeger UI to see how the Jaeger visualize all the trace data collected. Here is a Jaeger UI url:
196
233
197
234
```
198
-
$ open http://localhost:16686
235
+
open http://localhost:16686
199
236
```
200
237
201
238

@@ -211,8 +248,8 @@ You'll come up with Jager UI page like above, then search each traces. Here are
0 commit comments