Open nicks opened 1 year ago
when doing builds with compose, buildkit opentelemetry does not show end-to-end traces
the opentelemetry works correctly when using buildx directly
compose up
Expected result: I should see an end to end build trace. Here's an example of what it looks like when I use buildx directly:
Actual result: I get a bunch of disconnected buildkitd spans
Docker Compose version v2.15.1
Client: Context: desktop-linux Debug Mode: false Plugins: app: Docker App (Docker Inc., v0.9.1-beta3) buildx: Docker Buildx (Docker Inc., v0.9.1-docker) compose: Docker Compose (Docker Inc., v2.15.1) dev: Docker Dev Environments (Docker Inc., v0.0.5) extension: Manages Docker extensions (Docker Inc., v0.2.17) sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0) scan: Docker Scan (Docker Inc., v0.23.0) Server: Containers: 24 Running: 11 Paused: 0 Stopped: 13 Images: 65 Server Version: 20.10.22 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 2 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc Default Runtime: runc Init Binary: docker-init containerd version: 9ba4b250366a5ddde94bb7c9d1def331423aa323 runc version: v1.1.4-0-g5fd4c4d init version: de40ad0 Security Options: seccomp Profile: default cgroupns Kernel Version: 5.15.49-linuxkit Operating System: Docker Desktop OSType: linux Architecture: x86_64 CPUs: 4 Total Memory: 3.658GiB Name: docker-desktop ID: GUXY:5TEH:RSRI:NJHK:SHFQ:FARH:GSDW:N5DT:UXT5:IYST:656M:M7WM Docker Root Dir: /var/lib/docker Debug Mode: false HTTP Proxy: http.docker.internal:3128 HTTPS Proxy: http.docker.internal:3128 No Proxy: hubproxy.docker.internal Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: hubproxy.docker.internal:5000 127.0.0.0/8 Live Restore Enabled: false
@tonistiigi says:
in order to add extra StartSpan on client side you need client to be traced as well https://github.com/docker/buildx/commit/9d884501186b2269d341df6a4242627a70715c46#diff-7fdd319c657fbde54b83a5dfa233c5c2c417b291739ff75c05dc5d83ee7a9d24 is the initial commit for tracing in buildx. maybe something from there is missing in compose vendor
in order to add extra StartSpan on client side you need client to be traced as well
https://github.com/docker/buildx/commit/9d884501186b2269d341df6a4242627a70715c46#diff-7fdd319c657fbde54b83a5dfa233c5c2c417b291739ff75c05dc5d83ee7a9d24 is the initial commit for tracing in buildx. maybe something from there is missing in compose vendor
There's already way to much code duplicated in compose to support buildkit builds :'( I suggest we reconsider https://github.com/docker/compose/issues/9477
Description
when doing builds with compose, buildkit opentelemetry does not show end-to-end traces
the opentelemetry works correctly when using buildx directly
Steps To Reproduce
compose up
on a compose file with a build stanzaExpected result: I should see an end to end build trace. Here's an example of what it looks like when I use buildx directly:![Screenshot from 2023-01-09 18-20-51](https://user-images.githubusercontent.com/278641/211887200-26b5cd17-a8aa-4c18-9fc3-1496a31c86a1.png)
Actual result: I get a bunch of disconnected buildkitd spans![Screenshot from 2023-01-11 10-30-00](https://user-images.githubusercontent.com/278641/211887292-17b45518-4dfe-4e92-bc9e-c9d870dad872.png)
Compose Version
Docker Environment
Anything else?
@tonistiigi says: