-
Notifications
You must be signed in to change notification settings - Fork 921
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
Introduce AccessLogWriterUtil and Remove Unnecessary RequestContext Push/Pop #5985
Introduce AccessLogWriterUtil and Remove Unnecessary RequestContext Push/Pop #5985
Conversation
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. Thanks!
core/src/main/java/com/linecorp/armeria/server/logging/AccessLogWriter.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/server/ServiceConfig.java
Outdated
Show resolved
Hide resolved
ecaaa5f
to
912046f
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.
👍 👍
core/src/main/java/com/linecorp/armeria/server/logging/AccessLogWriter.java
Outdated
Show resolved
Hide resolved
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.
Thanks, @yzfeng2020! 🙇♂️🙇♂️
…ush/Pop (#5985) Motivation: As described in #5984, there are instances of unnecessary request context push/pop operations related to access logging when the access log writer is disabled. These operations are redundant since the logging path does not need to be triggered when the writer is disabled. Optimizing this behavior reduces unnecessary overhead in such cases. Modifications: - Added `AccessLogWriterUtil#maybeWriteAccessLog` - Writes access log only when `TransientServiceOption#WITH_ACCESS_LOGGING` is enabled and the access log writer is not disabled. - Updated `AbstractHttpResponseHandler` and `HttpServerHandler` Result: - Closes #5984. - Removes unnecessary context push/pop operations for access logging when the access log writer is disabled, resulting in a more efficient request handling process.
Motivation:
As described in #5984, there are instances of unnecessary request context push/pop operations related to access logging when the access log writer is disabled. These operations are redundant since the logging path does not need to be triggered when the writer is disabled. Optimizing this behavior reduces unnecessary overhead in such cases.
Modifications:
AccessLogWriterUtil#maybeWriteAccessLog
TransientServiceOption#WITH_ACCESS_LOGGING
is enabled and the access log writer is not disabled.AbstractHttpResponseHandler
andHttpServerHandler
Result: