Repository navigation
[O2B-1644] Reuse the API logger in gRPC as well to log all requests via its endpoints - #2296
Merged
graduta merged 3 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 #2296 +/- ##
==========================================
+ Coverage 45.76% 45.96% +0.19%
==========================================
Files 1065 1067 +2
Lines 17538 17589 +51
Branches 3242 3252 +10
==========================================
+ Hits 8027 8084 +57
+ Misses 9511 9505 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
gRPC logs read controller-mutated requests, losing run identifiers and requested changes.
1 open issue
What changed in this PR
This PR extracts HTTP access logging into a shared utility and extends it to gRPC endpoints, providing a common log format for OpenSearch.
Changes:
- Adds shared request logging with protocol identifiers and truncated
paramsstrings. - Integrates logging into HTTP middleware and gRPC controller bindings.
- Adds logging tests and updates backend and gRPC documentation.
| File | Description |
|---|---|
test/lib/server/utilities/index.js |
Registers the shared logger tests. |
test/lib/server/utilities/ApiRequestLogger.test.js |
Tests formatting, truncation, error handling, and timing. |
test/lib/server/middleware/accessLog.middleware.test.js |
Updates HTTP assertions for the shared format. |
test/gRPC/serviceImplementation.test.js |
Tests logging of successful and failed gRPC calls. |
lib/server/utilities/ApiRequestLogger.js |
Implements shared request formatting and logging. |
lib/server/middleware/accessLog.middleware.js |
Delegates HTTP logging to the shared utility. |
lib/server/gRPC/bindGRPCController.js |
Adds request logging around gRPC handlers. |
lib/domain/enums/ApiProtocols.js |
Defines shared protocol identifiers. |
docs/grpc.md |
Documents gRPC call logging. |
docs/backend-architecture.md |
Documents the unified access-log format. |
Review effort: Balanced
graduta
deleted the
feature/O2B-1644/improve-general-request-gRPC-logging
branch
October 26, 2026 14:36
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:
params(gRPC) andquery(HTTP) will be logged in the JSON under theparamsso that an OpenSearch dashboard can be used for both typesChanges made to the database: