github.com/GoogleContainerTools/skaffold@v1.39.18/examples/jaeger-skaffold-trace/README.md (about) 1 ### Example: Skaffold Command Tracing with Jaeger 2 3 [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/GoogleContainerTools/skaffold&cloudshell_open_in_editor=README.md&cloudshell_workspace=examples/jaegar-skaffold-trace) 4 5 6 _**WARNING: Skaffold's trace functionality is experimental and may change without notice.**_ 7 8 In this example: 9 10 * Use Skaffold to deploy a local/remote Jaeger instance 11 * Enable Skaffold tracing functionality to get trace information about skaffold `dev`, `build`, `deploy`, etc. timings 12 * Send Skaffold trace information to Jaeger and have that information be visible in the Jaeger UI, 13 14 In this example, we'll walk through enabling Skaffold trace information that can be used to explore performance bottlenecks and to get a more in depth view of user's local dev loop. 15 16 _**WARNING: If you're running this on a cloud cluster, this example will create a service and expose a webserver. 17 It's highly recommended that you only run this example on a local, private cluster like minikube or Kubernetes in Docker for Desktop.**_ 18 19 #### Setting up Jaeger locally 20 21 Use docker to start a local jaeger instance using the Jaeger project's [all-in-one docker setup](https://www.jaegertracing.io/docs/getting-started/#all-in-one): 22 ```bash 23 docker run -d --name jaeger \ 24 -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \ 25 -p 5775:5775/udp \ 26 -p 6831:6831/udp \ 27 -p 6832:6832/udp \ 28 -p 5778:5778 \ 29 -p 16686:16686 \ 30 -p 14268:14268 \ 31 -p 14250:14250 \ 32 -p 9411:9411 \ 33 jaegertracing/all-in-one:1.22 34 ``` 35 36 Now, in a different terminal, go to another Skaffold example (eg: microservices), enable SKAFFOLD_TRACE with Jaeger and start dev session there: 37 ```bash 38 cd ../microservices 39 export SKAFFOLD_TRACE=jaeger 40 skaffold dev 41 ``` 42 43 Now go to the Jaeger UI that Skaffold will port-forward to localhost at http://127.0.0.1:16686/ 44 45 Select service:`skaffold-trace` in the left bar and then click `Find Traces` on the bottom of the left bar. 46 47 From here you should be able to view all of the relevant traces 48 49 #### Cleaning up 50 To cleanup Jaeger all-in-one setup, run the following: 51 ``` 52 docker kill jaeger # stops the running jaeger container 53 docker rm jaeger #removes the container image 54 ```