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

Add factory based zap payload logging interceptor #469

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

deepakgupta33
Copy link

Feature Request:
We have a use case to extract key-value pairs from the context for the payload logging.

Current state:
The context sent by the grpc framework to the interceptor but there is no hook for payload interceptor user to plug into and be able to decorate the logger with the information in the context object. There are other interceptors which populate the context object.

Solution:
Instead of directly passing on the logger, we create another method that accepts a logger factory. The logger is created only after the context is received with the context object.

@google-cla
Copy link

google-cla bot commented Nov 3, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@deepakgupta33
Copy link
Author

@googlebot signed it!

@devnev devnev added the v1 label Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants