Open
Conversation
thinhha
reviewed
Jun 23, 2023
thinhha
reviewed
Jun 23, 2023
clouddq/log.py
Outdated
| labels={ | ||
| "name": APP_NAME, | ||
| "releaseId": APP_VERSION, | ||
| "metadata": str(metadata), |
Contributor
There was a problem hiding this comment.
Please ensure the metadata is not included as a string but as a nested object in the logs. I think this means instead of str() we need to use json.dumps()
thinhha
reviewed
Jun 23, 2023
thinhha
reviewed
Jun 23, 2023
clouddq/main.py
Outdated
Comment on lines
285
to
290
| dataplex_batch_name = os.environ.get("DATAPLEX_BATCH_NAME") | ||
| dataplex_task_name = os.environ.get("DATAPLEX_TASK_NAME") | ||
| if dataplex_batch_name: | ||
| metadata["dataplex_batch_name"] = dataplex_batch_name | ||
| if dataplex_task_name: | ||
| metadata["dataplex_task_name"] = dataplex_task_name |
Contributor
There was a problem hiding this comment.
can we move this out of the ifelse
Collaborator
Author
There was a problem hiding this comment.
If we move this out than both the variables will be included into the metadata dictionary. Instead if add_metadata_to_logs is set to false we need to create a new dictionary for both the variables and pass it into the add_cloud_logging_handler().
Collaborator
Author
There was a problem hiding this comment.
we can surely move out the part where we are reading the values for the variables.
thinhha
reviewed
Jun 23, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.