Merge pull request #19972 from dvdksn/build-ui-export-traces

build: export and analyze jaeger traces
This commit is contained in:
David Karlsson 2024-05-06 17:30:24 +02:00 committed by GitHub
commit d97da6e725
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 33 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

View File

@ -105,17 +105,45 @@ The **Configuration** section of the Info tab shows parameters passed to the bui
### Outputs and artifacts ### Outputs and artifacts
The **Build results** section shows a summary of the generated build artifacts, The **Build results** section shows a summary of the generated build artifacts,
including image manifest details, attestations, and Open Telemetry traces. including image manifest details, attestations, and build traces.
Attestations are metadata records attached to a container image. Attestations are metadata records attached to a container image.
The metadata describes something about the image, The metadata describes something about the image,
for example how it was built or what packages it contains. for example how it was built or what packages it contains.
For more information about attestations, see [Build attestations](../../build/attestations/_index.md). For more information about attestations, see [Build attestations](../../build/attestations/_index.md).
Open Telemetry traces for builds capture information about the build execution Build traces capture information about the build execution steps in Buildx and
steps in Buildx and BuildKit. You can view and analyze the traces yourself BuildKit. The traces are available in two formats: OTLP and Jaeger. You can
using a trace visualization tool like Jaeger. Refer to download build traces from Docker Desktop by opening the actions menu and
[OpenTelemetry support](../../build/building/opentelemetry.md) for more information. selecting the format you want to download.
#### Inspect build traces with Jaeger
Using a Jaeger client, you can import and inspect build traces from Docker
Desktop. The following steps show you how to export a trace from Docker Desktop
and view it in [Jaeger](https://www.jaegertracing.io/):
1. Start Jaeger UI:
```console
$ docker run -d --name jaeger -p "16686:16686" jaegertracing/all-in-one
```
2. Open the Builds view in Docker Desktop, and select a completed build.
3. Navigate to the **Build results** section, open the actions menu and select **Download as Jaeger format**.
<video controls>
<source src="/assets/video/build-jaeger-export.mp4" type="video/mp4" />
</video>
4. Go to <http://localhost:16686> in your browser to open Jaeger UI.
5. Select the **Upload** tab and open the Jaeger build trace you just exported.
Now you can analyze the build trace using the Jaeger UI:
![Jaeger UI screenshot](../images/build-ui-jaeger-screenshot.png "Screenshot of a build trace in the Jaeger UI")
### Dockerfile source and errors ### Dockerfile source and errors

Binary file not shown.