Skip to content

chore: improve logs on update tasks functions#1219

Merged
davidgamez merged 4 commits intomainfrom
chore/improve_logging_tasks
May 27, 2025
Merged

chore: improve logs on update tasks functions#1219
davidgamez merged 4 commits intomainfrom
chore/improve_logging_tasks

Conversation

@davidgamez
Copy link
Copy Markdown
Member

Summary:

Part of #1027
This PR updates the logging calls to the new standardized pattern on the update tasks functions.

Expected behavior:

The Logger class is no longer used in favour of the newly added logging functions.

Testing tips:

This can only be visible in the life environment.

  • Deploy to DEV environment
  • Tigger the functions
  • Verify that the logs are properly formatted with trace and span IDs.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@davidgamez
Copy link
Copy Markdown
Member Author

Log records:
Screenshot 2025-05-26 at 5 24 37 PM

@davidgamez davidgamez marked this pull request as ready for review May 26, 2025 21:25
"validator_endpoint": validator_endpoint,
},
}
logging.info(result)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Shouldn't the log give a bit more info, like what is this object it's printing?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The record contains a "message" field used by GCP as a descriptor:
Screenshot 2025-05-27 at 1 57 45 PM

@davidgamez davidgamez merged commit bb35112 into main May 27, 2025
8 of 9 checks passed
@davidgamez davidgamez deleted the chore/improve_logging_tasks branch May 27, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants