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:providers/zap: fix caller annotation #432

Merged

Conversation

jkawamoto
Copy link
Contributor

Logger.Log calls a zap's log function inside of this function. As a result, caller annotations always point zap/logger.go. This commit adds caller skip so that each log message has the correct annotation.

`Logger.Log` calls a zap's log function inside of this function.
As a result, caller annotations always point `logger.go`.

This commit adds caller skip so that each log message has the
correct annotation.
@codecov-commenter
Copy link

codecov-commenter commented Jul 1, 2021

Codecov Report

Merging #432 (0b8655e) into v2 (a79558a) will decrease coverage by 27.56%.
The diff coverage is 40.60%.

❗ Current head 0b8655e differs from pull request most recent head 1da5279. Consider uploading reports for the commit 1da5279 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##               v2     #432       +/-   ##
===========================================
- Coverage   83.58%   56.01%   -27.57%     
===========================================
  Files          30       38        +8     
  Lines         932     1346      +414     
===========================================
- Hits          779      754       -25     
- Misses        114      520      +406     
- 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.60% <0.00%> (-8.02%) ⬇️
interceptors/ratelimit/ratelimit.go 50.00% <0.00%> (-50.00%) ⬇️
interceptors/tags/fieldextractor.go 13.79% <0.00%> (-71.51%) ⬇️
testing/testpb/interceptor_suite.go 0.00% <0.00%> (ø)
testing/testpb/test.manual_extractfields.pb.go 0.00% <0.00%> (ø)
testing/testpb/test.manual_validator.pb.go 0.00% <0.00%> (ø)
testing/testpb/test.pb.go 36.92% <36.92%> (ø)
... and 51 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 0c113ab...1da5279. 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.

LGTM

@johanbrandhorst johanbrandhorst merged commit 27ca785 into grpc-ecosystem:v2 Jul 2, 2021
@johanbrandhorst
Copy link
Collaborator

Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

None yet

3 participants