# Using Jaeger Tracing for Prysm End-to-End Tests **Run a Prysm end-to-end test** We recommend running the basic, `TestEndToEnd_MinimalConfig` as a starting point: ``` bazel test //endtoend:go_default_test --test_filter=TestEndToEnd_MinimalConfig$ --test_output=streamed ``` It should take around 900s to complete **Inspect the outputs of the test** Navigate to the private folder where Bazel publishes its outputs. An example on MacOS looks like this, but will be different depending on your machine and installation. It should be under `/private/var/tmp/_bazel_youruser`: ``` cd /private/var/tmp/_bazel_youruser/3110b1f1c3be17896948666b76cfd91d/execroot/prysm/bazel-out/darwin-fastbuild-ST-f5229d06642b/testlogs/endtoend/go_default_test ``` Navigate to the `test.outputs` folder in the directory and you will see an `outputs.zip` file. **Unzip the outputs file and retrieve the tracing-http-requests.log.gz** Unzip the file `unzip outputs.zip` and inside you will find a `tracing-http-requests.log.gz` file. You can move this elsewhere, perhaps to your /tmp/ folder, for easier access. **Run jaeger all-in-one locally** Docker is the easiest option: ``` docker run -d --name jaeger \ -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \ -p 5775:5775/udp \ -p 6831:6831/udp \ -p 6832:6832/udp \ -p 5778:5778 \ -p 16686:16686 \ -p 14268:14268 \ -p 14250:14250 \ -p 9411:9411 \ jaegertracing/all-in-one:1.25 ``` Alternatively, you can also download the binaries, build from source with instructions [here](https://www.jaegertracing.io/docs/1.25/getting-started/) **Replay the http requests from the end-to-end test into jaeger** Run our own replay-http tool in the Prysm repository: ``` bazel run //tools/replay-http -- -file=/tmp/tracing-http-requests.log.gz -endpoint=http://localhost:14268/api/traces ``` You will see a stream of logs that looks something like this: ``` INFO[0040] &{POST http://localhost:14268/api/traces HTTP/1.1 1 1 map[Accept-Encoding:[gzip] Content-Length:[2160] Content-Type:[application/x-thrift] User-Agent:[Go-http-client/1.1]] 0xc0001f7600 <nil> 2160 [] false 127.0.0.1:9411 map[] map[] <nil> map[] <nil> <nil> <nil> <nil>} INFO[0040] HTTP/1.1 202 Accepted Content-Length: 0 Date: Tue, 10 Aug 2021 15:46:46 GMT INFO[0040] &{POST http://localhost:14268/api/traces HTTP/1.1 1 1 map[Accept-Encoding:[gzip] Content-Length:[2094] Content-Type:[application/x-thrift] User-Agent:[Go-http-client/1.1]] 0xc0002ad8c0 <nil> 2094 [] false 127.0.0.1:9411 map[] map[] <nil> map[] <nil> <nil> <nil> <nil>} INFO[0040] HTTP/1.1 202 Accepted Content-Length: 0 Date: Tue, 10 Aug 2021 15:46:46 GMT INFO[0040] &{POST http://localhost:14268/api/traces HTTP/1.1 1 1 map[Accept-Encoding:[gzip] Content-Length:[1486] Content-Type:[application/x-thrift] User-Agent:[Go-http-client/1.1]] 0xc0001f7740 <nil> 1486 [] false 127.0.0.1:9411 map[] map[] <nil> map[] <nil> <nil> <nil> <nil>} INFO[0040] HTTP/1.1 202 Accepted Content-Length: 0 Date: Tue, 10 Aug 2021 15:46:46 GMT ``` It should take less than a minute to complete. **Open the jaeger UI and visualize traces** Next, you can open your Jaeger UI at http://localhost:16686/search and visualize all traces you want. Jaeger UI supports copying deep links, making it easy to share with collaborators. **Bonus: Running jaeger with a real beacon node and validator** If you want to instead run your jaeger all-in-one with a running beacon node outside of end-to-end tests, simply pass in the flags to your beacon node: ``` --tracing-endpoint=http://localhost:14268/api/traces --enable-tracing ``` and you will be able to receive and view spans in your Jaeger UI as it runs.