-
Notifications
You must be signed in to change notification settings - Fork 141
interceptor: make request logging optional #1375
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
interceptor: make request logging optional #1375
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
ec1584b to
82012da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR makes interceptor request logging optional by introducing a new environment variable KEDA_HTTP_LOG_REQUESTS that defaults to false, addressing performance and log verbosity concerns in production environments.
Key changes:
- Added
LogRequestsconfiguration field to enable/disable request logging viaKEDA_HTTP_LOG_REQUESTSenvironment variable - Modified logging middleware to accept an optional logger pointer and skip logging when nil
- Added documentation for the new configuration option
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
interceptor/config/serving.go |
Added LogRequests boolean field with environment variable binding |
interceptor/middleware/logging.go |
Changed logger to pointer type and added nil check to make logging optional |
interceptor/main.go |
Conditionally initializes logger pointer based on LogRequests config |
docs/operate.md |
Added documentation section for request logging configuration |
CHANGELOG.md |
Updated with improvement entry for optional request logging |
.github/workflows/linkinator.yaml |
Fixed lychee link checker argument from --base-url to --root-dir |
.github/PULL_REQUEST_TEMPLATE.md |
Corrected relative path to docs directory |
.github/ISSUE_TEMPLATE/3_release_tracker.md |
Fixed malformed markdown link syntax |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Jan Wozniak <[email protected]>
82012da to
bb8c581
Compare
This PR contains two minor changes
--base-urlno longer accepts relative paths and should be replaced by--root-dir- see also: feat(base-url)!: disallow relative local base to avoid confusion lycheeverse/lychee#1857 and https://github.com/lycheeverse/lychee/releases/tag/lychee-v0.21.0Checklist
docs/directory