You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2024/11/27 22:53:31 UTC
(pulsar) 01/05: [improve][misc] Disable OTel by default when running the pulsar-perf tool (#23585)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 7fdeba5263f0614a780b25ffd3820e8dc2bebc64
Author: 萧易客 <km...@live.com>
AuthorDate: Thu Nov 28 04:34:07 2024 +0800
[improve][misc] Disable OTel by default when running the pulsar-perf tool (#23585)
(cherry picked from commit 2c36410754007b43601561937c95db8fb0edf354)
---
.../src/main/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 6bf73e705d1..1e2f6231c6e 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 @@ package org.apache.pulsar.testclient;
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 class PerfClientUtils {
.maxLookupRequests(arguments.maxLookupRequest)
.proxyServiceUrl(arguments.proxyServiceURL, arguments.proxyProtocol)
.openTelemetry(AutoConfiguredOpenTelemetrySdk.builder()
+ .addPropertiesSupplier(() -> Map.of(
+ "otel.sdk.disabled", "true"
+ ))
.build().getOpenTelemetrySdk());
if (isNotBlank(arguments.authPluginClassName)) {