Skip to content

Commit 5afb93c

Browse files
authored
[OpenTelemetry] Turn off gcp otel auth extension by default. (#38940)
* turn off gcp otel auth extension by default.
1 parent 8e4ea73 commit 5afb93c

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingDataflowWorker.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,12 @@ public static void main(String[] args) throws Exception {
10611061
}
10621062
});
10631063
LOG.info("Enabled Open Telemetry with properties: {}", openTelemetryProperties);
1064+
} else {
1065+
// turn off auth extension so it doesn't interfere if user is configuring otel e.g. via
1066+
// JvmInitializer.
1067+
if (System.getProperty("google.otel.auth.target.signals") == null) {
1068+
System.setProperty("google.otel.auth.target.signals", "none");
1069+
}
10641070
}
10651071

10661072
LOG.debug("Creating StreamingDataflowWorker from options: {}", options);

sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnHarness.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,12 @@ public static void main(
315315
}
316316
});
317317
LOG.info("Enabled Open Telemetry with properties: {}", openTelemetryProperties);
318+
} else {
319+
// turn off auth extension so it doesn't interfere if user is configuring otel e.g. via
320+
// JvmInitializer.
321+
if (System.getProperty("google.otel.auth.target.signals") == null) {
322+
System.setProperty("google.otel.auth.target.signals", "none");
323+
}
318324
}
319325
EnumMap<
320326
BeamFnApi.InstructionRequest.RequestCase,

0 commit comments

Comments
 (0)