tracing: fix buildx tracing delegation#3909
Conversation
before this change, the threadsafe wrapper would hide the delegate interface, which breaks the ability to send traces. after this change, tracing works again! fixes docker/buildx#1847 Signed-off-by: Nick Santos <nick.santos@docker.com>
util/tracing/detect/threadsafe.go
Outdated
| } | ||
|
|
||
| func makeThreadSafe(exp sdktrace.SpanExporter) sdktrace.SpanExporter { | ||
| d, isDelegate := exp.(tracerDelegate) |
There was a problem hiding this comment.
Maybe this should detect the *jaeger.Exporter instead and only make that thread-safe. Delegated exporter is already thread-safe.
There was a problem hiding this comment.
Or actually just wrap it in jaegerExporter(), not in the detect pkg.
There was a problem hiding this comment.
ya, maybe the real solution is to complain upstream about the jaeger exporter not being thread-safe. in any case, i moved this code into the jaeger package.
|
@jedevc We need to take this into v0.11 buildx |
Signed-off-by: Nick Santos <nick.santos@docker.com>
do we need this for the 0.11 branch as well, for the docker builder? |
|
@thaJeztah |
|
@tonistiigi ah, gotcha. Disclaimer: haven't fully followed all things, but I knew @milas was working on OTEL support (which I expect would also be for the "docker" builder), hence wondering if this would be related (and needed). |
before this change, the threadsafe wrapper would hide the delegate interface, which breaks the ability
to send traces.
after this change, tracing works again!
fixes docker/buildx#1847