Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,10 @@ public static void main(String[] args) throws Exception {
}
});
LOG.info("Enabled Open Telemetry with properties: {}", openTelemetryProperties);
} else {
// turn off auth extension so it doesn't interfere if user is configuring otel e.g. via
// JvmInitializer.
System.setProperty("google.otel.auth.target.signals", "none");
}
Comment on lines +1062 to 1066

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Unconditionally setting the system property google.otel.auth.target.signals will overwrite any value explicitly configured by the user (e.g., via command-line JVM arguments like -Dgoogle.otel.auth.target.signals=...). It is safer to check if the property is already set before overriding it.

Suggested change
} else {
// turn off auth extension so it doesn't interfere if user is configuring otel e.g. via
// JvmInitializer.
System.setProperty("google.otel.auth.target.signals", "none");
}
} else {
// turn off auth extension so it doesn't interfere if user is configuring otel e.g. via
// JvmInitializer.
if (System.getProperty("google.otel.auth.target.signals") == null) {
System.setProperty("google.otel.auth.target.signals", "none");
}
}


LOG.debug("Creating StreamingDataflowWorker from options: {}", options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ public static void main(
}
});
LOG.info("Enabled Open Telemetry with properties: {}", openTelemetryProperties);
} else {
// turn off auth extension so it doesn't interfere if user is configuring otel e.g. via
// JvmInitializer.
System.setProperty("google.otel.auth.target.signals", "none");
}
Comment on lines +309 to 313

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Unconditionally setting the system property google.otel.auth.target.signals will overwrite any value explicitly configured by the user (e.g., via command-line JVM arguments like -Dgoogle.otel.auth.target.signals=...). It is safer to check if the property is already set before overriding it.

      } else {
        // turn off auth extension so it doesn't interfere if user is configuring otel e.g. via
        // JvmInitializer.
        if (System.getProperty("google.otel.auth.target.signals") == null) {
          System.setProperty("google.otel.auth.target.signals", "none");
        }
      }

EnumMap<
BeamFnApi.InstructionRequest.RequestCase,
Expand Down
Loading