From 4809c22eb31f8376ffab6945fa5f41a86d59e228 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Mon, 7 Oct 2024 11:03:57 +0200 Subject: [PATCH] disable otel meterProvider which seem to cause a memory leak Signed-off-by: Nicolas De Loof --- internal/tracing/tracing.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/tracing/tracing.go b/internal/tracing/tracing.go index 126dd42a13..6936d3df0e 100644 --- a/internal/tracing/tracing.go +++ b/internal/tracing/tracing.go @@ -25,6 +25,7 @@ import ( "github.com/docker/compose/v2/internal" "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric/noop" "github.com/docker/cli/cli/command" "github.com/moby/buildkit/util/tracing/detect" @@ -62,6 +63,9 @@ type envMap map[string]string func InitTracing(dockerCli command.Cli) (ShutdownFunc, error) { // set global propagator to tracecontext (the default is no-op). otel.SetTextMapPropagator(propagation.TraceContext{}) + // workaround for https://github.com/moby/moby/issues/48144 + // see https://github.com/moby/moby/issues/48204#issuecomment-2377593220 + otel.SetMeterProvider(noop.MeterProvider{}) return InitProvider(dockerCli) }