From 2d3a07de85a8350389ec9eee3b36ff07d066f411 Mon Sep 17 00:00:00 2001 From: Cyrille Le Clerc Date: Thu, 4 Jul 2024 23:54:19 +0200 Subject: [PATCH] Fix infinite loop in ReconfigurableEventLoggingProvider Signed-off-by: Cyrille Le Clerc --- .../opentelemetry/ReconfigurableOpenTelemetry.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/jenkins/plugins/opentelemetry/opentelemetry/ReconfigurableOpenTelemetry.java b/src/main/java/io/jenkins/plugins/opentelemetry/opentelemetry/ReconfigurableOpenTelemetry.java index 99b979a0d..31f8fb3cf 100644 --- a/src/main/java/io/jenkins/plugins/opentelemetry/opentelemetry/ReconfigurableOpenTelemetry.java +++ b/src/main/java/io/jenkins/plugins/opentelemetry/opentelemetry/ReconfigurableOpenTelemetry.java @@ -26,6 +26,7 @@ import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import io.opentelemetry.sdk.common.CompletableResultCode; +import io.opentelemetry.sdk.logs.internal.SdkEventLoggerProvider; import io.opentelemetry.sdk.resources.Resource; import java.io.Closeable; @@ -132,7 +133,7 @@ public void setOpenTelemetryImpl(OpenTelemetry openTelemetryImpl) { this.meterProviderImpl.setDelegate(openTelemetryImpl.getMeterProvider()); this.traceProviderImpl.setDelegate(openTelemetryImpl.getTracerProvider()); this.loggerProviderImpl.setDelegate(openTelemetryImpl.getLogsBridge()); - this.eventLoggerProviderImpl.setDelegate(GlobalEventLoggerProvider.get()); + this.eventLoggerProviderImpl.setDelegate(SdkEventLoggerProvider.create(openTelemetryImpl.getLogsBridge())); } @Override