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

Lager Logger for Filtering Specific Messages #734

Conversation

ralikio
Copy link
Member

@ralikio ralikio commented May 7, 2024

Description

Current configuration of KEBs broker-api uses errors as a way to return HTTP status code. Such errors are logged with ERROR level but they do not interrupt normal application behaviour nor require additional intervention from dev side. The following PR introduces possibility to filter such logs by their message. Errors that are filtered out are redirected to stdout with level changed to INFO.

Changes proposed in this pull request:

  • Filtering messages so that unnecessary ERRORs are not logged in broker-api layer.

Related issue(s)

@kyma-bot kyma-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 7, 2024
@kyma-bot
Copy link
Contributor

kyma-bot commented May 7, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kyma-bot kyma-bot added the cla: yes Indicates the PR's author has signed the CLA. label May 7, 2024
Copy link

github-actions bot commented May 7, 2024

Add one of following labels

- kind/feature -> Use it when you want to submit a new feature

- kind/enhancement -> Use it when you modify or improve an existing feature

- kind/bug -> Use it when you fix a bug

@kyma-bot kyma-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 7, 2024
@ralikio ralikio removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 10, 2024
@ralikio ralikio marked this pull request as ready for review May 10, 2024 13:24
@ralikio ralikio requested a review from a team as a code owner May 10, 2024 13:24
@kyma-bot kyma-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 10, 2024
@ralikio ralikio added the kind/enhancement Categorizes issue or PR as related to modifying or improving an existing feature label May 10, 2024
@ralikio
Copy link
Member Author

ralikio commented May 13, 2024

Example of log messages that should be filtered out to INFO:

  • kyma-env-broker.getInstance.instance with instanceID ceda647c-a8bc-459b-aca4-121eef6cb3c0 does not exist
  • kyma-env-broker.getInstance.provisioning of instanceID 8B509AE8-416D-4E7A-9649-02FB8698DD66 failed
  • kyma-env-broker.getInstance.provisioning of instanceID 03EA90AE-C152-4442-BAD6-0E091D60ACA8 in progress

@ralikio ralikio self-assigned this May 27, 2024
@ralikio
Copy link
Member Author

ralikio commented Jun 3, 2024

Decided not to filter such logs in the code.

@ralikio ralikio closed this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. kind/enhancement Categorizes issue or PR as related to modifying or improving an existing feature size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants