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

RHCLOUD-35286: Ensure log verbosity can be adjusted #155

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Adam0Brien
Copy link
Contributor

@Adam0Brien Adam0Brien commented Sep 23, 2024

PR Template:

Describe your changes

  • Added a filter for inventory podman logs that can be adjusted via inventory-api-compose

Steps:

  • Set log level to warn via inventory-api-compose.yaml
  • make inventory-up
  • kill relations-api pod
  • curl readyz endpoint (looking for intentional failure to test warn logs)
  • check podman logs for errors
Log Level is set to: warn
ERROR ts=2024-09-23T14:31:35Z caller=log/log.go:30 service.name=inventory-api service.version=0.1.0 trace.id= span.id= service.id=738b063b4a09 msg=RELATIONS-API UNHEALTHY
ERROR ts=2024-09-23T14:31:35Z caller=log/log.go:30 service.name=inventory-api service.version=0.1.0 trace.id= span.id= service.id=738b063b4a09 msg=RELATIONS-API UNHEALTHY
ERROR ts=2024-09-23T14:31:35Z caller=log/log.go:30 service.name=inventory-api service.version=0.1.0 trace.id= span.id= service.id=738b063b4a09 msg=RELATIONS-API UNHEALTHY

Steps:

  • Set log level to info via inventory-api-compose.yaml
  • make inventory-up
  • check inventory podman logs
Log Level is set to: info
INFO ts=2024-09-23T14:32:43Z caller=log/helper.go:117 service.name=inventory-api service.version=0.1.0 trace.id= span.id= msg=Using config file: /inventory-api-compose.yaml
INFO ts=2024-09-23T14:32:43Z caller=log/log.go:30 service.name=inventory-api service.version=0.1.0 trace.id= span.id= subsystem=storage msg=Using backing storage: postgres
INFO ts=2024-09-23T14:32:43Z caller=log/log.go:30 service.name=inventory-api service.version=0.1.0 trace.id= span.id= subsystem=authn msg=Will check for client certs
INFO ts=2024-09-23T14:32:43Z caller=log/log.go:30 service.name=inventory-api service.version=0.1.0 trace.id= span.id= subsystem=authn msg=Loading pre-shared-keys from /psks.yaml
INFO ts=2024-09-23T14:32:43Z caller=log/log.go:30 service.name=inventory-api service.version=0.1.0 trace.id= span.id= subsystem=authz msg=Using authorizer: kessel
INFO ts=2024-09-23T14:32:43Z caller=log/log.go:30 service.name=inventory-api service.version=0.1.0 trace.id= span.id= subsystem=eventing msg=Using eventing: stdout
INFO ts=2024-09-23T14:32:43Z caller=log/log.go:30 service.name=inventory-api service.version=0.1.0 trace.id= span.id= service.id=f629c2427bf6 msg=[gRPC] server listening on: [::]:9081
INFO ts=2024-09-23T14:32:43Z caller=log/log.go:30 service.name=inventory-api service.version=0.1.0 trace.id= span.id= service.id=f629c2427bf6 msg=[HTTP] server listening on: [::]:8081

Ticket reference (if applicable)

Fixes #RHCLOUD-35286

Checklist

  • Are the agreed upon acceptance criteria fulfilled?

  • Was the 4-eye-principle applied? (async PR review, pairing, ensembling)

  • Do your changes have passing automated tests and sufficient observability?

  • Are the work steps you introduced repeatable by others, either through automation or documentation?

    • If automation is possible but not done due to other constraints, a ticket to the tech debt sprint is added
    • An SOP (Standard Operating Procedure) was created
  • The Changes were automatically built, tested, and - if needed, behind a feature flag - deployed to our production environment. (Please check this when the new deployment is done and you could verify it.)

  • Are the agreed upon coding/architectural practices applied?

  • Are security needs fullfilled? (e.g. no internal URL)

  • Is the corresponding Ticket in the right state? (should be on "review" now, put to done when this change made it to production)

  • For changes to the public API / code dependencies: Was the whole team (or a sufficient amount of ppl) able to review?

@Adam0Brien Adam0Brien force-pushed the change-log-verb branch 2 times, most recently from 22b78f0 to e26d346 Compare September 23, 2024 15:39
@Adam0Brien Adam0Brien marked this pull request as ready for review September 23, 2024 16:20
@@ -25,3 +25,5 @@ storage:
user: "postgres"
password: "yPsw5e6ab4bvAGe5H"
dbname: "spicedb"
log:
level: "info"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also add log: level to kafka-inventory-api.yaml or sso-inventory-api.yaml

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.

2 participants