Skip to content
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

etcdserver/api/v3rpc/interceptor: add log level checking #10021

Merged

Conversation

jingyih
Copy link
Contributor

@jingyih jingyih commented Aug 17, 2018

Check log level before generating and writing log info. If debug level is not enabled, skip logUnaryRequestStats() to avoid potential performance degradation.

/cc @jpbetz @gyuho

Check log level before generating and writing log info.
@jpbetz
Copy link
Contributor

jpbetz commented Aug 17, 2018

Thanks for fixing!

Lgtm

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

jingyih pushed a commit to jingyih/etcd that referenced this pull request Aug 18, 2018
etcdserver.

To improve debuggability of etcd v3. Added a grpc interceptor to log
info on incoming requests to etcd server. The log output includes remote
client info, request content (with value field redacted), request
handling latency, response size, etc.

Dependency on zap logger and grpc_middleware is removed during
backporting.

Added checking in logging interceptor. If debug level is disabled, skip
logUnaryRequestStats() to avoid potential performance degradation. (PR etcd-io#10021)
@gyuho gyuho merged commit 0a25f49 into etcd-io:master Aug 18, 2018
jingyih pushed a commit to jingyih/etcd that referenced this pull request Aug 20, 2018
…tcdserver.

To improve debuggability of etcd v3. Added a grpc interceptor to log
info on incoming requests to etcd server. The log output includes remote
client info, request content (with value field redacted), request
handling latency, response size, etc.

Dependency on zap logger and grpc_middleware is removed during
backporting.

Added checking in logging interceptor. If debug level is disabled, skip
logUnaryRequestStats() to avoid potential performance degradation. (PR etcd-io#10021)
jingyih pushed a commit to jingyih/etcd that referenced this pull request Aug 20, 2018
etcdserver

To improve debuggability of etcd v3.1. Added a grpc interceptor to log
info on incoming requests to etcd server. The log output includes remote
client info, request content (with value field redacted), request
handling latency, response size, etc.

Dependency on zap logger and grpc_middleware is removed during
backporting.

Added checking in logging interceptor. If debug level is disabled, skip
logUnaryRequestStats() to avoid potential performance degradation. (PR etcd-io#10021)
@jingyih
Copy link
Contributor Author

jingyih commented Aug 27, 2018

/cc @wenjiaswe

@jingyih jingyih deleted the add_log_level_checking_in_logging_interceptor branch September 7, 2019 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants