vendor: update buildkit to v0.11.0-rc4

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-01-06 11:22:18 +00:00
committed by Tonis Tiigi
parent a8be6b576b
commit 7394853ddf
30 changed files with 2648 additions and 542 deletions

View File

@ -0,0 +1,26 @@
package detect
import (
"context"
"sync"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
)
// threadSafeExporterWrapper wraps an OpenTelemetry SpanExporter and makes it thread-safe.
type threadSafeExporterWrapper struct {
mu sync.Mutex
exporter sdktrace.SpanExporter
}
func (tse *threadSafeExporterWrapper) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error {
tse.mu.Lock()
defer tse.mu.Unlock()
return tse.exporter.ExportSpans(ctx, spans)
}
func (tse *threadSafeExporterWrapper) Shutdown(ctx context.Context) error {
tse.mu.Lock()
defer tse.mu.Unlock()
return tse.exporter.Shutdown(ctx)
}