diff --git a/docs/img/jaeger-query.png b/docs/img/jaeger-query.png new file mode 100644 index 0000000000..f33d24242d Binary files /dev/null and b/docs/img/jaeger-query.png differ diff --git a/docs/opentelemetry.md b/docs/opentelemetry.md index 43e2d3260e..8ca850e9a8 100644 --- a/docs/opentelemetry.md +++ b/docs/opentelemetry.md @@ -12,12 +12,47 @@ To try this out: You should now see that the /tmp/trace file is created. -Then we have an experimental tool to serve the trace file to jaeger: +Then we have an experimental tool to serve the trace file to jaeger. First ensure `jaeger-query` is in your PATH, available [here](https://www.jaegertracing.io/download/#binaries) ``` cd tools/otel/traceserver go run . --src /tmp/trace --run jaeger ``` +Alternatively you can use the jaeger docker image with: + +``` +go run . --src /tmp/trace --run docker-jaeger +``` + +This will open your local jaeger-query's frontend in a web browser: + +![Jaeger UI](./img/jaeger-query.png) + Not everything is instrumented yet, and not all the traces are fully joined up (we need to thread more contexts through more methods), but you should be able to start to explore the operations that we run and their performance. + +## Prow Jobs + +Tracing is enabled in the kops prow jobs. `.otel` files are created during job execution and included as job artifacts in the `otlp` subdirectory. + +Example: + +``` +https://gcsweb.k8s.io/gcs/kubernetes-jenkins/pr-logs/pull/kops/16204/presubmit-kops-aws-scale-amazonvpc-using-cl2/1742962895290896384/artifacts/otlp/ +``` + +Download these files to a local directory, either with `gsutil` or through a web browser + +``` +mkdir /tmp/job-traces + +gsutil cp -r gs://kubernetes-jenkins/pr-logs/pull/kops/16204/presubmit-kops-aws-scale-amazonvpc-using-cl2/1742962895290896384/artifacts/otlp/ /tmp/job-traces +``` + +Then run the trace server as normal: + +```sh +cd tools/otel/traceserver +go run . --src /tmp/traces --run jaeger +``` \ No newline at end of file