I'm currently facing issues with buildkit always enabling the OTEL traces exporter during build.
The software I'm trying to run during the build, uses OTEL itself. Thus, because buildkit configures the OTEL_TRACES_EXPORTER environment variable, it tries to export the traces it generates. But because of grpc/grpc#9538 this fails, as buildkit seems to use SSL for GRPC communication, but does not configure the exporter with TLS (grpc+tls).
Because of this, I tried to disable the traces export, because I do not need it at all. But setting the --driver-opt="env.OTEL_TRACES_EXPORTER=none" did not work, even though the environment variable is set on the build container.
For reference: I'm using a Fedora 40 with the following versions:
> docker --version
Docker version 26.1.3, build b72abbb
> docker buildx version
github.com/docker/buildx v0.14.0 171fcbe
> docker buildx inspect container
Name: container
Driver: docker-container
Last Activity: 2024-05-30 13:37:20 +0000 UTC
Nodes:
Name: container0
Endpoint: unix:///var/run/docker.sock
Driver Options: env.OTEL_TRACES_EXPORTER="none"
Status: running
BuildKit daemon flags: --allow-insecure-entitlement=network.host
BuildKit version: v0.13.2
Platforms: linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/arm64, linux/riscv64, linux/ppc64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
Labels:
org.mobyproject.buildkit.worker.executor: oci
org.mobyproject.buildkit.worker.hostname: 4c03dedd3e04
org.mobyproject.buildkit.worker.network: host
org.mobyproject.buildkit.worker.oci.process-mode: sandbox
org.mobyproject.buildkit.worker.selinux.enabled: false
org.mobyproject.buildkit.worker.snapshotter: overlayfs
GC Policy rule#0:
All: false
Filters: type==source.local,type==exec.cachemount,type==source.git.checkout
Keep Duration: 48h0m0s
Keep Bytes: 488.3MiB
GC Policy rule#1:
All: false
Keep Duration: 1440h0m0s
Keep Bytes: 174.2GiB
GC Policy rule#2:
All: false
Keep Bytes: 174.2GiB
GC Policy rule#3:
All: true
Keep Bytes: 174.2GiB
I've tried to explicitly downgrade buildkit to v0.12.5 as described in #4743 but it does not solve my issue.
So the question is: How can I disable OpenTelemetry in buildkit and prevent it from adding the ´OTEL_TRACES_EXPORTER` environment variable to the build env?
Thanks in advance!
I'm currently facing issues with buildkit always enabling the OTEL traces exporter during build.
The software I'm trying to run during the build, uses OTEL itself. Thus, because buildkit configures the
OTEL_TRACES_EXPORTERenvironment variable, it tries to export the traces it generates. But because of grpc/grpc#9538 this fails, as buildkit seems to use SSL for GRPC communication, but does not configure the exporter with TLS (grpc+tls).Because of this, I tried to disable the traces export, because I do not need it at all. But setting the
--driver-opt="env.OTEL_TRACES_EXPORTER=none"did not work, even though the environment variable is set on the build container.For reference: I'm using a Fedora 40 with the following versions:
I've tried to explicitly downgrade buildkit to v0.12.5 as described in #4743 but it does not solve my issue.
So the question is: How can I disable OpenTelemetry in buildkit and prevent it from adding the ´OTEL_TRACES_EXPORTER` environment variable to the build env?
Thanks in advance!