shunping commented on code in PR #34062:
URL: https://github.com/apache/beam/pull/34062#discussion_r1970480193
##########
sdks/python/apache_beam/io/gcp/gcsio.py:
##########
@@ -125,14 +126,32 @@ def create_storage_client(pipeline_options,
use_credentials=True):
from google.api_core import client_info
beam_client_info = client_info.ClientInfo(
user_agent="apache-beam/%s (GPN:Beam)" % beam_version.__version__)
+
+ # Note: Custom audit entries with "job" key will overwrite this default.
+ extra_headers = {
+ "x-goog-custom-audit-job": google_cloud_options.job_name
+ if google_cloud_options.job_name else "UNKNOWN"
Review Comment:
That's right, but it will also add extra overhead on querying GCE metadata,
which could be a problem if we spin up like thousands of workers.
On the other hand, the job name is implemented in an old PR. Changing it to
job id may be a breaking change for current users.
Given that cx are fine with us introducing custom audit key value pairs, I
think we will go with this approach, which will also give cx flexibility if
they want to include other custom info in the audit log.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]