Repository navigation
[O2B-1644] Add general logging middleware for improved statistics - #2295
Merged
graduta merged 5 commits intoOct 26, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2295 +/- ##
==========================================
+ Coverage 45.73% 45.76% +0.03%
==========================================
Files 1066 1065 -1
Lines 17544 17538 -6
Branches 3241 3242 +1
==========================================
+ Hits 8024 8027 +3
+ Misses 9520 9511 -9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
Requests traversing both API routers can generate duplicate log entries and inflate endpoint usage statistics.
1 open issue
What changed in this PR
This PR replaces endpoint-specific filter logging with shared HTTP API access logging to support endpoint usage and response-time statistics.
Changes:
- Adds structured access logs with route, status, duration, user, response size, and token-filtered query data.
- Registers logging on both API routers and removes the previous filter logger.
- Adds middleware tests and documents the log format.
| File | Description |
|---|---|
| test/lib/server/middleware/index.js | Registers access-log tests. |
| test/lib/server/middleware/accessLog.middleware.test.js | Tests logging, token exclusion, aborted responses, and silent mode. |
| lib/server/WebUiServer.js | Registers logging on both API routers. |
| lib/server/routers/simulationPasses.router.js | Removes endpoint-specific logging. |
| lib/server/routers/runs.router.js | Removes endpoint-specific logging. |
| lib/server/routers/qcFlag.router.js | Removes endpoint-specific logging. |
| lib/server/routers/logs.router.js | Removes endpoint-specific logging. |
| lib/server/routers/lhcPeriodsStatistics.router.js | Removes endpoint-specific logging. |
| lib/server/routers/lhcFills.router.js | Removes endpoint-specific logging. |
| lib/server/routers/environments.router.js | Removes endpoint-specific logging. |
| lib/server/routers/dataPasses.router.js | Removes endpoint-specific logging. |
| lib/server/middleware/InfoLoggerListener.middleware.js | Deletes the previous logging middleware. |
| lib/server/middleware/index.js | Exports the access-log middleware. |
| lib/server/middleware/accessLog.middleware.js | Implements structured response-completion logging. |
| lib/server/Loggers/FilterLogger.js | Deletes the filter-specific logger. |
| docs/backend-architecture.md | Documents access-log fields and behavior. |
Review effort: Balanced
graduta
deleted the
feature/O2B-1644/improve-general-request-API-logging
branch
October 26, 2026 13:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

I have a JIRA ticket
Notable changes for users:
Notable changes for developers:
Changes made to the database: