-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix: move log comment middleware #6899
Conversation
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
1 similar comment
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
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.
👍 Looks good to me! Reviewed everything up to 30994c9 in 1 minute and 35 seconds
More details
- Looked at
214
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. pkg/http/middleware/logging.go:87
- Draft comment:
Consider handling the error returned byurl.Parse(referrer)
to avoid potential nil pointer dereference issues. - Reason this comment was not posted:
Confidence changes required:50%
The PR moves the LogCommentEnricher functionality into the logging middleware. This change is reflected in the removal of the LogCommentEnricher middleware from the server setup and its integration into the logging middleware. The code seems to be correctly refactored, but there is a potential issue with error handling in the getLogCommentKVs function.
2. pkg/http/middleware/logging.go:81
- Draft comment:
Do not add non-ClickHouse related functions to the ClickHouseReader interface. Use the DAO in the telemetry instance to access such information instead. - Reason this comment was not posted:
Comment looked like it was already resolved.
Workflow ID: wflow_YO8lxwDhjBHCkUby
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 9aeeb08 in 16 seconds
More details
- Looked at
22
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. pkg/http/middleware/logging.go:55
- Draft comment:
Consider renaminggetLogCommentKVs
to something more descriptive likeextractLogCommentKVs
to better convey its purpose. - Reason this comment was not posted:
Confidence changes required:33%
The change from a standalone function to a method of the Logging struct is appropriate given the context of the PR. However, the method name should be more descriptive to indicate its purpose clearly.
2. pkg/http/middleware/logging.go:55
- Draft comment:
Avoid using inline styles in React components. Instead, use external stylesheets, CSS classes, or styled components. This comment applies to all instances of inline styles in this file. - Reason this comment was not posted:
Confidence changes required:50%
The code does not violate any of the specified rules. The changes made are consistent with the existing code structure and do not introduce any new issues.
Workflow ID: wflow_IgNuU0nSMiQj9489
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
Part of https://github.com/SigNoz/platform-pod/issues/406
log comment is now a part of logging middleware, which add the the values to the context.
Important
Refactored log comment functionality into
Logging
middleware, removingLogCommentEnricher
from server setup.LogCommentEnricher
togetLogCommentKVs
inLogging
middleware inlogging.go
.LogCommentEnricher
middleware fromcreatePrivateServer
andcreatePublicServer
inserver.go
in bothee/query-service/app
andpkg/query-service/app
.getLogCommentKVs
now enriches request context with log comment data inLogging.Wrap()
.LogCommentEnricher
function fromserver.go
in bothee/query-service/app
andpkg/query-service/app
.This description was created by for 9aeeb08. It will automatically update as commits are pushed.