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

v2:interceptors/logging: allow to separate request response payload logging #442

Conversation

michaljemala
Copy link
Contributor

@michaljemala michaljemala commented Jul 13, 2021

Logging payloads of requests on the server-side and similarly of responses on the client-side is a pretty common and desired use-case. However, logging by default payloads of both requests as well as responses in both scenarios is IMO not a very common requirement.

Consider the following PR to enable more granular control of what to log and when. This is achieved by using a special PayloadDecison type having the following values:

  • NoPayloadLogging - Payload logging is disabled.
  • LogRequest - Only logging of requests is enabled.
  • LogResponse - Only logging of responses is enabled.
  • LogRequestAndResponse - Logging of both requests and responses is enabled.
    The PayloadDecison is to be used instead of the original bool by the logging.ServerPayloadLoggingDecider and logging.ClientPayloadLoggingDecider.

NOTE: I quickly put this together to see whether it could be considered a valid approach, thus please excuse the lack of additional unit tests. I will be glad to add those once the approach is approved.

@google-cla
Copy link

google-cla bot commented Jul 13, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@michaljemala
Copy link
Contributor Author

@googlebot I fixed it.

@google-cla
Copy link

google-cla bot commented Jul 13, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@michaljemala michaljemala force-pushed the v2_separate_request_response_payload_logs branch from 1c3e861 to 5bcaa5b Compare July 13, 2021 22:17
@michaljemala
Copy link
Contributor Author

@googlebot I fixed it.

@michaljemala michaljemala force-pushed the v2_separate_request_response_payload_logs branch from 5bcaa5b to ebc4206 Compare July 13, 2021 22:22
@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2021

Codecov Report

Merging #442 (e75d159) into v2 (6e2c2ac) will decrease coverage by 25.51%.
The diff coverage is 42.66%.

❗ Current head e75d159 differs from pull request most recent head 9f260f9. Consider uploading reports for the commit 9f260f9 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##               v2     #442       +/-   ##
===========================================
- Coverage   84.01%   58.49%   -25.52%     
===========================================
  Files          30       38        +8     
  Lines         932     1706      +774     
===========================================
+ Hits          783      998      +215     
- Misses        110      636      +526     
- Partials       39       72       +33     
Impacted Files Coverage Δ
chain.go 0.00% <ø> (-90.91%) ⬇️
interceptors/auth/auth.go 100.00% <ø> (ø)
interceptors/auth/metadata.go 100.00% <ø> (ø)
interceptors/logging/options.go 82.85% <0.00%> (-7.77%) ⬇️
interceptors/ratelimit/ratelimit.go 60.00% <0.00%> (-40.00%) ⬇️
interceptors/recovery/options.go 78.57% <ø> (ø)
interceptors/retry/backoff.go 52.94% <ø> (+2.94%) ⬆️
interceptors/tags/context.go 64.00% <ø> (ø)
interceptors/tags/fieldextractor.go 15.15% <0.00%> (-70.15%) ⬇️
interceptors/tags/interceptors.go 95.65% <ø> (ø)
... and 44 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc87da6...9f260f9. Read the comment docs.

Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

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

I quite like this, but it was @bwplotka who refactored these, so I would prefer to have his input.

Copy link
Collaborator

@yashrsharma44 yashrsharma44 left a comment

Choose a reason for hiding this comment

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

Functionally - I think using a switch case would make this code easier to read and maintainable. Otherwise looks good to me!

interceptors/logging/payload.go Outdated Show resolved Hide resolved
@yashrsharma44
Copy link
Collaborator

Hi @michaljemala !

This PR looks good to me, can you run make lint for fixing the CI changes required?
Otherwise looks good to me.

@yashrsharma44
Copy link
Collaborator

cc'ing @bwplotka for the inputs 😄

@michaljemala michaljemala force-pushed the v2_separate_request_response_payload_logs branch 3 times, most recently from 685607e to e75d159 Compare August 3, 2021 06:29
@yashrsharma44
Copy link
Collaborator

Seems like the CI build needs approval for first time contributors - https://github.blog/changelog/2021-04-22-github-actions-maintainers-must-approve-first-time-contributor-workflow-runs/

@michaljemala
Copy link
Contributor Author

Hi @yashrsharma44 is there anything else on my side to be done?

@yashrsharma44
Copy link
Collaborator

We are blocked on @bwplotka's review. Let me get back to him when he is free.

Copy link
Collaborator

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM, only minor nit and lint error 🤗

Thanks!

// NoPayloadLogging - Payload logging is disabled.
NoPayloadLogging PayloadDecision = iota
// LogRequest - Only logging of requests is enabled.
LogRequest
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
LogRequest
LogPayloadRequest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

// LogRequest - Only logging of requests is enabled.
LogRequest
// LogResponse - Only logging of responses is enabled.
LogResponse
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
LogResponse
LogPayloadResponse

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

// LogResponse - Only logging of responses is enabled.
LogResponse
// LogRequestAndResponse - Logging of both requests and responses is enabled.
LogRequestAndResponse
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
LogRequestAndResponse
LogPayloadRequestAndResponse

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@michaljemala michaljemala force-pushed the v2_separate_request_response_payload_logs branch from e75d159 to 9f260f9 Compare August 7, 2021 07:29
Copy link
Collaborator

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Thanks!

@bwplotka bwplotka merged commit 274df59 into grpc-ecosystem:v2 Aug 7, 2021
yurishkuro added a commit to jaegertracing/jaeger that referenced this pull request Jun 13, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/grpc-ecosystem/go-grpc-middleware](https://github.com/grpc-ecosystem/go-grpc-middleware)
| `v1.4.0` -> `v2.1.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgrpc-ecosystem%2fgo-grpc-middleware/v2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgrpc-ecosystem%2fgo-grpc-middleware/v2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgrpc-ecosystem%2fgo-grpc-middleware/v1.4.0/v2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgrpc-ecosystem%2fgo-grpc-middleware/v1.4.0/v2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>grpc-ecosystem/go-grpc-middleware
(github.com/grpc-ecosystem/go-grpc-middleware)</summary>

###
[`v2.1.0`](https://github.com/grpc-ecosystem/go-grpc-middleware/releases/tag/v2.1.0)

[Compare
Source](https://github.com/grpc-ecosystem/go-grpc-middleware/compare/v2.0.1...v2.1.0)

#### What's Changed

- Support for subsystem in grpc prometheus counter and histogram metrics
by [@&#8203;rohsaini](https://github.com/rohsaini) in
[grpc-ecosystem/go-grpc-middleware#643
- doc: update client interceptors chaining example with grpc functions
by [@&#8203;dethi](https://github.com/dethi) in
[grpc-ecosystem/go-grpc-middleware#669
- adds fields from durationFieldFunc to request/response log entries by
[@&#8203;vroldanbet](https://github.com/vroldanbet) in
[grpc-ecosystem/go-grpc-middleware#670
- add doc for disabling log opts by
[@&#8203;coleenquadros](https://github.com/coleenquadros) in
[grpc-ecosystem/go-grpc-middleware#680
- Middleware for determining the real ip of the client by
[@&#8203;MadsRC](https://github.com/MadsRC) in
[grpc-ecosystem/go-grpc-middleware#682
- protovalidate: add option to ignore certain message types by
[@&#8203;igor-tsiglyar](https://github.com/igor-tsiglyar) in
[grpc-ecosystem/go-grpc-middleware#684
- Update README.md by [@&#8203;zeroboo](https://github.com/zeroboo) in
[grpc-ecosystem/go-grpc-middleware#688
- Fix `InitializeMetrics` signature to allow use with `xds.GRPCServer`
by [@&#8203;bozaro](https://github.com/bozaro) in
[grpc-ecosystem/go-grpc-middleware#689
- Support retriable func condition by
[@&#8203;tamayika](https://github.com/tamayika) in
[grpc-ecosystem/go-grpc-middleware#687
- Extend realip parsing of GRPC peer address to handle IPv6 by
[@&#8203;surik](https://github.com/surik) in
[grpc-ecosystem/go-grpc-middleware#692
- Fix logging Example : log only first field by
[@&#8203;arckadious](https://github.com/arckadious) in
[grpc-ecosystem/go-grpc-middleware#694
- Extent realip interceptors with ip selection based on proxy count and
list by [@&#8203;surik](https://github.com/surik) in
[grpc-ecosystem/go-grpc-middleware#695
- Fix for vulnerability CVE-2023-44487 by
[@&#8203;vkaushik](https://github.com/vkaushik) in
[grpc-ecosystem/go-grpc-middleware#696

#### New Contributors

- [@&#8203;rohsaini](https://github.com/rohsaini) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#643
- [@&#8203;dethi](https://github.com/dethi) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#669
- [@&#8203;vroldanbet](https://github.com/vroldanbet) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#670
- [@&#8203;MadsRC](https://github.com/MadsRC) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#682
- [@&#8203;igor-tsiglyar](https://github.com/igor-tsiglyar) made their
first contribution in
[grpc-ecosystem/go-grpc-middleware#684
- [@&#8203;zeroboo](https://github.com/zeroboo) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#688
- [@&#8203;bozaro](https://github.com/bozaro) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#689
- [@&#8203;tamayika](https://github.com/tamayika) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#687
- [@&#8203;surik](https://github.com/surik) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#692
- [@&#8203;arckadious](https://github.com/arckadious) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#694
- [@&#8203;vkaushik](https://github.com/vkaushik) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#696

**Full Changelog**:
grpc-ecosystem/go-grpc-middleware@v2.0.1...v2.1.0

###
[`v2.0.1`](https://github.com/grpc-ecosystem/go-grpc-middleware/releases/tag/v2.0.1)

[Compare
Source](https://github.com/grpc-ecosystem/go-grpc-middleware/compare/v2.0.0...v2.0.1)

#### What's Changed

- Fix outdated 'make proto' command by
[@&#8203;takp](https://github.com/takp) in
[grpc-ecosystem/go-grpc-middleware#623
- Fix linting errors by [@&#8203;takp](https://github.com/takp) in
[grpc-ecosystem/go-grpc-middleware#624
- Logging: Add missing variadic operator for fields by
[@&#8203;olivierlemasle](https://github.com/olivierlemasle) in
[grpc-ecosystem/go-grpc-middleware#629
- feat: Support extracting fields from CallMeta by
[@&#8203;fsaintjacques](https://github.com/fsaintjacques) in
[grpc-ecosystem/go-grpc-middleware#628
- Fix "make test" and "make lint" by
[@&#8203;olivierlemasle](https://github.com/olivierlemasle) in
[grpc-ecosystem/go-grpc-middleware#627
- Do not set timeout for stream initialization by
[@&#8203;DavyJohnes](https://github.com/DavyJohnes) in
[grpc-ecosystem/go-grpc-middleware#645
- Add logging option to disable fields in log entry by
[@&#8203;coleenquadros](https://github.com/coleenquadros) in
[grpc-ecosystem/go-grpc-middleware#631
- Update logging adapter docs by
[@&#8203;aboryslawski](https://github.com/aboryslawski) in
[grpc-ecosystem/go-grpc-middleware#647

#### New Contributors

- [@&#8203;takp](https://github.com/takp) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#623
- [@&#8203;olivierlemasle](https://github.com/olivierlemasle) made
their first contribution in
[grpc-ecosystem/go-grpc-middleware#629
- [@&#8203;fsaintjacques](https://github.com/fsaintjacques) made their
first contribution in
[grpc-ecosystem/go-grpc-middleware#628
- [@&#8203;DavyJohnes](https://github.com/DavyJohnes) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#645
- [@&#8203;coleenquadros](https://github.com/coleenquadros) made their
first contribution in
[grpc-ecosystem/go-grpc-middleware#631
- [@&#8203;aboryslawski](https://github.com/aboryslawski) made their
first contribution in
[grpc-ecosystem/go-grpc-middleware#647

**Full Changelog**:
grpc-ecosystem/go-grpc-middleware@v2.0.0...v2.0.1

###
[`v2.0.0`](https://github.com/grpc-ecosystem/go-grpc-middleware/releases/tag/v2.0.0)

[Compare
Source](https://github.com/grpc-ecosystem/go-grpc-middleware/compare/v1.4.0...v2.0.0)

This is the first stable release of the new v2 release branch 🎉

Many of the interceptors have been rewritten from scratch and the
project has been upgraded to use the Go Protobuf v2 API.

See the project README for details and migration guide. Thanks to all
contributors who made this possible! 💪🏽

#### What's Changed

- Initial change for v2. by
[@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#276
- Updated README with note that it's under development. by
[@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#278
- Fix typo in field extractor (splices -> slices)
([#&#8203;287](https://github.com/grpc-ecosystem/go-grpc-middleware/issues/287))
by [@&#8203;bvwells](https://github.com/bvwells) in
[grpc-ecosystem/go-grpc-middleware#289
- Moved imports to v2; Moved to Go 1.14.2 by
[@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#290
- Formatted code; Added goimports to Makefile, Renamed pb_testproto to
testpb. by [@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#291
- Fixed providers go modules, examples and consistency. by
[@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#292
- added example for AuthFuncOverride v2 branch by
[@&#8203;tegk](https://github.com/tegk) in
[grpc-ecosystem/go-grpc-middleware#294
- Added some description of the Makefile in the contributing.md by
[@&#8203;yashrsharma44](https://github.com/yashrsharma44) in
[grpc-ecosystem/go-grpc-middleware#298
- v2: Add support for the zerolog logging provider by
[@&#8203;irridia](https://github.com/irridia) in
[grpc-ecosystem/go-grpc-middleware#299
- proto: fix gogoproto import by
[@&#8203;johanbrandhorst](https://github.com/johanbrandhorst) in
[grpc-ecosystem/go-grpc-middleware#302
- Retry dial and connection errors for grpc stream. by
[@&#8203;kartlee](https://github.com/kartlee) in
[grpc-ecosystem/go-grpc-middleware#308
- Moved to GH actions; Added lint; Added issue/PR templates. by
[@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#296
- inline localhost certificate into go file by
[@&#8203;bmon](https://github.com/bmon) in
[grpc-ecosystem/go-grpc-middleware#318
- Update streaming interceptor example by
[@&#8203;G07cha](https://github.com/G07cha) in
[grpc-ecosystem/go-grpc-middleware#322
- Do not stop retrying based on earlier good message from the stream by
[@&#8203;kartlee](https://github.com/kartlee) in
[grpc-ecosystem/go-grpc-middleware#323
- test certs - cherry-pick PR325 on v2 by
[@&#8203;dmitris](https://github.com/dmitris) in
[grpc-ecosystem/go-grpc-middleware#331
- add all make target, reword instructions by
[@&#8203;dmitris](https://github.com/dmitris) in
[grpc-ecosystem/go-grpc-middleware#335
- remove 1.12.x from build config for consistency with master by
[@&#8203;dmitris](https://github.com/dmitris) in
[grpc-ecosystem/go-grpc-middleware#337
- \[v2] Fix the special case for jaeger format traceid extraction by
[@&#8203;nvx](https://github.com/nvx) in
[grpc-ecosystem/go-grpc-middleware#340
- \[v2] Fix ctxtags TagBasedRequestFieldExtractor extracting from fields
in a oneof by [@&#8203;nvx](https://github.com/nvx) in
[grpc-ecosystem/go-grpc-middleware#339
- Request Logging by
[@&#8203;yashrsharma44](https://github.com/yashrsharma44) in
[grpc-ecosystem/go-grpc-middleware#311
- Bug fix for data race by
[@&#8203;yashrsharma44](https://github.com/yashrsharma44) in
[grpc-ecosystem/go-grpc-middleware#354
- make ratelimit interface context aware by
[@&#8203;xinxiao](https://github.com/xinxiao) in
[grpc-ecosystem/go-grpc-middleware#367
- Add error param to the decider method of logging middleware by
[@&#8203;yashrsharma44](https://github.com/yashrsharma44) in
[grpc-ecosystem/go-grpc-middleware#372
- \[v2] Add skip interceptor by
[@&#8203;XSAM](https://github.com/XSAM) in
[grpc-ecosystem/go-grpc-middleware#364
- Chain middleware by
[@&#8203;drewwells](https://github.com/drewwells) in
[grpc-ecosystem/go-grpc-middleware#385
- Update travis ci badget to Github actions badge. by
[@&#8203;drewwells](https://github.com/drewwells) in
[grpc-ecosystem/go-grpc-middleware#384
- Upgraded proto related deps: grpc and protobuf; removed gogo from
core. by [@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#321
- improve v2 rate-limiter by
[@&#8203;MalloZup](https://github.com/MalloZup) in
[grpc-ecosystem/go-grpc-middleware#380
- Moved to buf; Added buf lint; Fixed ping service to match standards; …
by [@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#383
- Add timer interface for OpenMetrics(Prometheus) Provider by
[@&#8203;yashrsharma44](https://github.com/yashrsharma44) in
[grpc-ecosystem/go-grpc-middleware#387
- \[Rate-limit provider]: Add token bucket implementation of
rate-limiter by [@&#8203;MalloZup](https://github.com/MalloZup) in
[grpc-ecosystem/go-grpc-middleware#386
- Add OpenMetrics(Prometheus) in the provider module by
[@&#8203;yashrsharma44](https://github.com/yashrsharma44) in
[grpc-ecosystem/go-grpc-middleware#379
- v2: Client unary interceptor timeout on v2 branch by
[@&#8203;instabledesign](https://github.com/instabledesign) in
[grpc-ecosystem/go-grpc-middleware#330
- add onRetryCallback callback function by
[@&#8203;shamil](https://github.com/shamil) in
[grpc-ecosystem/go-grpc-middleware#405
- v2: validator support for protoc-gen-validate 0.6.0 by
[@&#8203;danielhochman](https://github.com/danielhochman) in
[grpc-ecosystem/go-grpc-middleware#418
- v2: Refactor metrics interceptor and fix tests by
[@&#8203;ash2k](https://github.com/ash2k) in
[grpc-ecosystem/go-grpc-middleware#413
- Support customization of timestamp format (v2 branch) by
[@&#8203;stanhu](https://github.com/stanhu) in
[grpc-ecosystem/go-grpc-middleware#399
- Fixed misleading comments in the interceptor file by
[@&#8203;iamrajiv](https://github.com/iamrajiv) in
[grpc-ecosystem/go-grpc-middleware#424
- v2: Switch from github.com/go-kit/kit to github.com/go-kit/log
interfaces by [@&#8203;liggitt](https://github.com/liggitt) in
[grpc-ecosystem/go-grpc-middleware#427
- v2: Add support for the phuslog logging provider by
[@&#8203;ogimenezb](https://github.com/ogimenezb) in
[grpc-ecosystem/go-grpc-middleware#425
- v2:providers/zap: fix caller annotation by
[@&#8203;jkawamoto](https://github.com/jkawamoto) in
[grpc-ecosystem/go-grpc-middleware#432
- Added Dependabot by [@&#8203;iamrajiv](https://github.com/iamrajiv)
in
[grpc-ecosystem/go-grpc-middleware#376
- Added a Copyright check in the Makefile by
[@&#8203;yashrsharma44](https://github.com/yashrsharma44) in
[grpc-ecosystem/go-grpc-middleware#420
- Cleanup v2 with some updates by
[@&#8203;yashrsharma44](https://github.com/yashrsharma44) in
[grpc-ecosystem/go-grpc-middleware#419
- openmetrics: forward server context by
[@&#8203;amenzhinsky](https://github.com/amenzhinsky) in
[grpc-ecosystem/go-grpc-middleware#434
- recovery: change the default behavior by
[@&#8203;amenzhinsky](https://github.com/amenzhinsky) in
[grpc-ecosystem/go-grpc-middleware#439
- Add all-validator support by
[@&#8203;leventeliu](https://github.com/leventeliu) in
[grpc-ecosystem/go-grpc-middleware#443
- Remove backoffutils and added the files to retry package by
[@&#8203;yashrsharma44](https://github.com/yashrsharma44) in
[grpc-ecosystem/go-grpc-middleware#390
- v2:interceptors/logging: allow to separate request response payload
logging by [@&#8203;michaljemala](https://github.com/michaljemala) in
[grpc-ecosystem/go-grpc-middleware#442
- Removed tags; Simplified interceptor code; Added logging fields
editability. by [@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#394
- InterceptorTestSuite client connection optimize by
[@&#8203;HUSTtoKTH](https://github.com/HUSTtoKTH) in
[grpc-ecosystem/go-grpc-middleware#455
- Remove opentracing from go.mod by
[@&#8203;jpkrohling](https://github.com/jpkrohling) in
[grpc-ecosystem/go-grpc-middleware#477
- Replace two old Go versions with two new ones by
[@&#8203;jpkrohling](https://github.com/jpkrohling) in
[grpc-ecosystem/go-grpc-middleware#478
- Move util/metautils to root-level package metadata, fixes
[#&#8203;392](https://github.com/grpc-ecosystem/go-grpc-middleware/issues/392)
by [@&#8203;rahulkhairwar](https://github.com/rahulkhairwar) in
[grpc-ecosystem/go-grpc-middleware#474
- Remove data race from zerolog provider by
[@&#8203;ecordell](https://github.com/ecordell) in
[grpc-ecosystem/go-grpc-middleware#487
- Update provider/kit by
[@&#8203;metalmatze](https://github.com/metalmatze) in
[grpc-ecosystem/go-grpc-middleware#490
- Refactor tracing interceptor by
[@&#8203;XSAM](https://github.com/XSAM) in
[grpc-ecosystem/go-grpc-middleware#450
- Add opentracing provider by [@&#8203;XSAM](https://github.com/XSAM)
in
[grpc-ecosystem/go-grpc-middleware#492
- update phuslog to fix typo by
[@&#8203;ogimenezb](https://github.com/ogimenezb) in
[grpc-ecosystem/go-grpc-middleware#499
- Added logr as logging Library provider by
[@&#8203;mcdoker18](https://github.com/mcdoker18) in
[grpc-ecosystem/go-grpc-middleware#510
- ✨ new feat: selector middleware by
[@&#8203;aimuz](https://github.com/aimuz) in
[grpc-ecosystem/go-grpc-middleware#511
- Add 1.18.x and 1.19.x unit tests by
[@&#8203;aimuz](https://github.com/aimuz) in
[grpc-ecosystem/go-grpc-middleware#513
- change the doc.go to the latest format by
[@&#8203;aimuz](https://github.com/aimuz) in
[grpc-ecosystem/go-grpc-middleware#512
- fix provider examples by
[@&#8203;forsaken628](https://github.com/forsaken628) in
[grpc-ecosystem/go-grpc-middleware#529
- docs: add `logging.InjectFields` usage description by
[@&#8203;aimuz](https://github.com/aimuz) in
[grpc-ecosystem/go-grpc-middleware#541
- Bump golang.org/x/net from 0.0.0-20201021035429-f5854403a974 to 0.7.0
by [@&#8203;dependabot](https://github.com/dependabot) in
[grpc-ecosystem/go-grpc-middleware#537
- v2: All for v2: Exemplars, Cleanup, Docs, Lint, Proto upgrades and
more by [@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#543
- \[interceptors/validator] feat: add error logging in validator by
[@&#8203;rohanraj7316](https://github.com/rohanraj7316) in
[grpc-ecosystem/go-grpc-middleware#544
- fix auto-generated docs by
[@&#8203;peczenyj](https://github.com/peczenyj) in
[grpc-ecosystem/go-grpc-middleware#548
- fix vulnerability GO-2022-0603 by
[@&#8203;peczenyj](https://github.com/peczenyj) in
[grpc-ecosystem/go-grpc-middleware#549
- add support to trace on grpc_logrus.DefaultMessageProducer by
[@&#8203;peczenyj](https://github.com/peczenyj) in
[grpc-ecosystem/go-grpc-middleware#547
- Simplified logging middleware; Fields are now "any" type; Moved
logging providers to examples only. by
[@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#552
- Removed deciders; Cleaned up validators. by
[@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#554
- Adjustments to README and consistency of callback options. by
[@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#555
- Merge v2 into main (with -X theirs) by
[@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#556
- Bump golang.org/x/net from 0.5.0 to 0.7.0 in /providers/prometheus by
[@&#8203;dependabot](https://github.com/dependabot) in
[grpc-ecosystem/go-grpc-middleware#561
- Fix overwritten logger in zerolog example by
[@&#8203;longshine](https://github.com/longshine) in
[grpc-ecosystem/go-grpc-middleware#574
- Changed for for mapping fields, different var for logger in zap
example by [@&#8203;MichalFikejs](https://github.com/MichalFikejs) in
[grpc-ecosystem/go-grpc-middleware#581
- cleanup: no cap definition required by
[@&#8203;aimuz](https://github.com/aimuz) in
[grpc-ecosystem/go-grpc-middleware#582
- providers/prometheus: Add WithHistogramOpts for native histograms by
[@&#8203;metalmatze](https://github.com/metalmatze) in
[grpc-ecosystem/go-grpc-middleware#584
- fix: Refactor logger initialization in example_test.go by
[@&#8203;aimuz](https://github.com/aimuz) in
[grpc-ecosystem/go-grpc-middleware#580
- Minor code cleanups by [@&#8203;ash2k](https://github.com/ash2k) in
[grpc-ecosystem/go-grpc-middleware#586
- fix prometheus interceptors not converting context errors to gRPC
codes by [@&#8203;vtermanis](https://github.com/vtermanis) in
[grpc-ecosystem/go-grpc-middleware#571
- Update README.md by [@&#8203;bwplotka](https://github.com/bwplotka)
in
[grpc-ecosystem/go-grpc-middleware#600
- Update PULL_REQUEST_TEMPLATE.md by
[@&#8203;bwplotka](https://github.com/bwplotka) in
[grpc-ecosystem/go-grpc-middleware#601
- Add Client rate limit interceptors 520 by
[@&#8203;rahulkhairwar](https://github.com/rahulkhairwar) in
[grpc-ecosystem/go-grpc-middleware#599
- Use default go errors package instead of github.com/pkg/errors by
[@&#8203;rifkyazizf](https://github.com/rifkyazizf) in
[grpc-ecosystem/go-grpc-middleware#608
- fix bug : should drain channel of timer after stop by
[@&#8203;ikenchina](https://github.com/ikenchina) in
[grpc-ecosystem/go-grpc-middleware#612
- feat: add interceptor for bufbuild/protovalidate by
[@&#8203;gvencadze](https://github.com/gvencadze) in
[grpc-ecosystem/go-grpc-middleware#614
- Enhancement: Introduce Option Interface for Future Interceptor
Customization by
[@&#8203;elliotmjackson](https://github.com/elliotmjackson) in
[grpc-ecosystem/go-grpc-middleware#615

#### New Contributors

- [@&#8203;irridia](https://github.com/irridia) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#299
- [@&#8203;xinxiao](https://github.com/xinxiao) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#367
- [@&#8203;XSAM](https://github.com/XSAM) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#364
- [@&#8203;MalloZup](https://github.com/MalloZup) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#380
- [@&#8203;instabledesign](https://github.com/instabledesign) made
their first contribution in
[grpc-ecosystem/go-grpc-middleware#330
- [@&#8203;shamil](https://github.com/shamil) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#405
- [@&#8203;ash2k](https://github.com/ash2k) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#413
- [@&#8203;ogimenezb](https://github.com/ogimenezb) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#425
- [@&#8203;amenzhinsky](https://github.com/amenzhinsky) made their
first contribution in
[grpc-ecosystem/go-grpc-middleware#434
- [@&#8203;leventeliu](https://github.com/leventeliu) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#443
- [@&#8203;michaljemala](https://github.com/michaljemala) made their
first contribution in
[grpc-ecosystem/go-grpc-middleware#442
- [@&#8203;HUSTtoKTH](https://github.com/HUSTtoKTH) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#455
- [@&#8203;jpkrohling](https://github.com/jpkrohling) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#477
- [@&#8203;rahulkhairwar](https://github.com/rahulkhairwar) made their
first contribution in
[grpc-ecosystem/go-grpc-middleware#474
- [@&#8203;ecordell](https://github.com/ecordell) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#487
- [@&#8203;metalmatze](https://github.com/metalmatze) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#490
- [@&#8203;mcdoker18](https://github.com/mcdoker18) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#510
- [@&#8203;aimuz](https://github.com/aimuz) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#511
- [@&#8203;forsaken628](https://github.com/forsaken628) made their
first contribution in
[grpc-ecosystem/go-grpc-middleware#529
- [@&#8203;dependabot](https://github.com/dependabot) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#537
- [@&#8203;rohanraj7316](https://github.com/rohanraj7316) made their
first contribution in
[grpc-ecosystem/go-grpc-middleware#544
- [@&#8203;peczenyj](https://github.com/peczenyj) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#548
- [@&#8203;longshine](https://github.com/longshine) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#574
- [@&#8203;MichalFikejs](https://github.com/MichalFikejs) made their
first contribution in
[grpc-ecosystem/go-grpc-middleware#581
- [@&#8203;vtermanis](https://github.com/vtermanis) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#571
- [@&#8203;rifkyazizf](https://github.com/rifkyazizf) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#608
- [@&#8203;ikenchina](https://github.com/ikenchina) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#612
- [@&#8203;gvencadze](https://github.com/gvencadze) made their first
contribution in
[grpc-ecosystem/go-grpc-middleware#614
- [@&#8203;elliotmjackson](https://github.com/elliotmjackson) made
their first contribution in
[grpc-ecosystem/go-grpc-middleware#615

**Full Changelog**:
grpc-ecosystem/go-grpc-middleware@v1.4.0...v2.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/jaegertracing/jaeger).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJjaGFuZ2Vsb2c6ZGVwZW5kZW5jaWVzIl19-->

---------

Signed-off-by: Mend Renovate <bot@renovateapp.com>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Co-authored-by: Yuri Shkuro <github@ysh.us>
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.

For Payload Logging Interceptors, consider allowing deciding on both request and response
5 participants