mirror of https://github.com/docker/docs.git
build: opentelemetry support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
1cd72a6029
commit
1e18821ebc
|
@ -1561,6 +1561,8 @@ manuals:
|
||||||
title: Multi-stage builds
|
title: Multi-stage builds
|
||||||
- path: /build/building/multi-platform/
|
- path: /build/building/multi-platform/
|
||||||
title: Multi-platform images
|
title: Multi-platform images
|
||||||
|
- path: /build/building/opentelemetry/
|
||||||
|
title: OpenTelemetry support
|
||||||
- path: /build/building/base-images/
|
- path: /build/building/base-images/
|
||||||
title: Create your own base image
|
title: Create your own base image
|
||||||
- sectiontitle: Drivers
|
- sectiontitle: Drivers
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
---
|
||||||
|
title: OpenTelemetry support
|
||||||
|
keywords: build, buildx buildkit, opentelemetry
|
||||||
|
---
|
||||||
|
|
||||||
|
Both Buildx and BuildKit support [OpenTelemetry](https://opentelemetry.io/){:target="blank" rel="noopener" class=""}.
|
||||||
|
|
||||||
|
To capture the trace to [Jaeger](https://github.com/jaegertracing/jaeger){:target="blank" rel="noopener" class=""},
|
||||||
|
set `JAEGER_TRACE` environment variable to the collection address using a
|
||||||
|
`driver-opt`.
|
||||||
|
|
||||||
|
First create a Jaeger container:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ docker run -d --name jaeger -p "6831:6831/udp" -p "16686:16686" jaegertracing/all-in-one
|
||||||
|
```
|
||||||
|
|
||||||
|
Then [create a `docker-container` builder](../drivers/docker-container.md)
|
||||||
|
that will use the Jaeger instance via the `JAEGER_TRACE` env var:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ docker buildx create --use \
|
||||||
|
--name mybuilder \
|
||||||
|
--driver docker-container \
|
||||||
|
--driver-opt "network=host" \
|
||||||
|
--driver-opt "env.JAEGER_TRACE=localhost:6831"
|
||||||
|
```
|
||||||
|
|
||||||
|
Boot and [inspect `mybuilder`](../../engine/reference/commandline/buildx_inspect.md):
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ docker buildx inspect --bootstrap
|
||||||
|
```
|
||||||
|
|
||||||
|
Buildx commands should be traced at `http://127.0.0.1:16686/`:
|
||||||
|
|
||||||
|

|
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
Loading…
Reference in New Issue