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

I want to ignore some defult logged fields #604

Open
mehmetakiftatar opened this issue Jul 13, 2023 · 1 comment
Open

I want to ignore some defult logged fields #604

mehmetakiftatar opened this issue Jul 13, 2023 · 1 comment

Comments

@mehmetakiftatar
Copy link

I use github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors for add logging , but it came with different unnesesery fields like grpc.method_type i dont need thoose. So i forked repo and customize it. But i think we need option to ignore given fields with key.

What happened:
... message="started call" protocol=grpc grpc.component=server grpc.service=MockService grpc.method=GetUser grpc.method_type=unary peer.address=127.0.0.1:35722 grpc.start_time=2023-07-13T09:32:34Z grpc.time_ms=0.019

What you expected to happen:
... message="started call" grpc.method=GetUser

If accept the issue i can open pr for change the behavior.

@bwplotka
Copy link
Collaborator

Makes sense to me. Customization here would make sense. Perhaps option to specify fields to add would work (with default specifying all)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants