Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(logs): standardize application logging (#20731) #21442

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dhawos
Copy link

@dhawos dhawos commented Jan 9, 2025

I've tried implementing what was requested in #20731.

I moved the getAppLog function (that will return log.Fields when given an Application). From the application controller to the common utils. I'm not too sure if that's the right place for such a function so let me know if I should put it elsewhere.
I'm not sure I've found all the places where it could be used, but I searched through all usage of the log.WithField(s) methods and changed those that were logging application details.

I only changed places where an Application struct was available, I saw that in some places we had different structs (such as ApplicationQuery) but I wasn't sure that it was in scope so I did not change it.

I have not written any test since I'm not introducing any new logic but if you think some tests are relevant, I'd be glad to implement them.

Fixes #20731

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

Copy link

bunnyshell bot commented Jan 9, 2025

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@dhawos dhawos marked this pull request as ready for review January 10, 2025 07:52
@dhawos dhawos requested a review from a team as a code owner January 10, 2025 07:52
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.

Standardize the application-related log structured fields
1 participant