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

Avoid Logging 4XX Status Codes as Errors #1279

Closed
surajit-zs opened this issue Dec 9, 2024 · 0 comments · Fixed by #1304
Closed

Avoid Logging 4XX Status Codes as Errors #1279

surajit-zs opened this issue Dec 9, 2024 · 0 comments · Fixed by #1304
Assignees
Labels
enhancement New feature or request Service Related to external http, grpc communciation , middlewares etc.

Comments

@surajit-zs
Copy link
Contributor

Problem

Currently, 4XX HTTP status codes are logged as errors, which can clutter the logs and mislead monitoring systems. Client-side issues should not be considered server errors.

Expected Behavior

  • 4XX status codes should be treated as info or excluded from error logs.
  • Only 5XX status codes should be logged as errors.

Proposed Solution

  • Introduce conditional logging:
    • Log 5XX status codes as errors.
    • Optionally log 4XX as info or ignore them entirely.
image
@Umang01-hash Umang01-hash self-assigned this Dec 10, 2024
@Umang01-hash Umang01-hash added enhancement New feature or request Service Related to external http, grpc communciation , middlewares etc. labels Dec 10, 2024
This was referenced Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Service Related to external http, grpc communciation , middlewares etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants