From 2c36410754007b43601561937c95db8fb0edf354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=A7=E6=98=93=E5=AE=A2?= Date: Thu, 28 Nov 2024 04:34:07 +0800 Subject: [PATCH] [improve][misc] Disable OTel by default when running the pulsar-perf tool (#23585) --- .../java/org/apache/pulsar/testclient/PerfClientUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerfClientUtils.java b/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerfClientUtils.java index 6bf73e705d16c..1e2f6231c6ed9 100644 --- a/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerfClientUtils.java +++ b/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerfClientUtils.java @@ -21,6 +21,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk; import java.lang.management.ManagementFactory; +import java.util.Map; import java.util.Objects; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; @@ -79,6 +80,9 @@ public static ClientBuilder createClientBuilderFromArguments(PerformanceBaseArgu .maxLookupRequests(arguments.maxLookupRequest) .proxyServiceUrl(arguments.proxyServiceURL, arguments.proxyProtocol) .openTelemetry(AutoConfiguredOpenTelemetrySdk.builder() + .addPropertiesSupplier(() -> Map.of( + "otel.sdk.disabled", "true" + )) .build().getOpenTelemetrySdk()); if (isNotBlank(arguments.authPluginClassName)) {