-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
WrapError: wrap an error with fields to be logged by zap.Error #1271
Open
prashantv
wants to merge
10
commits into
uber-go:master
Choose a base branch
from
prashantv:err-fields
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Apr 12, 2023
-
WrapError: wrap an error with fields to be logged by zap.Error
Related to uber-go/guide#179 Callsites that receive an error should either log, or return an error. However, if the callsite has additioanl context, the simplest option is to add it to the error, but it's then flattened into a string, losing the benefit of structured logging. This often results in callsites logging with additional fields, and returning an error that is likely to be logged again. `WrapError` provides a way for callsites to return an error that includes fields to be logged, which will be added to an `errorFields` key.
Configuration menu - View commit details
-
Copy full SHA for a99527f - Browse repository at this point
Copy the full SHA a99527fView commit details
Commits on Apr 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2a88ec3 - Browse repository at this point
Copy the full SHA 2a88ec3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b71daf6 - Browse repository at this point
Copy the full SHA b71daf6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 36183ab - Browse repository at this point
Copy the full SHA 36183abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1122080 - Browse repository at this point
Copy the full SHA 1122080View commit details -
Configuration menu - View commit details
-
Copy full SHA for 568f031 - Browse repository at this point
Copy the full SHA 568f031View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26b53cc - Browse repository at this point
Copy the full SHA 26b53ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for c9125d3 - Browse repository at this point
Copy the full SHA c9125d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f96d3a - Browse repository at this point
Copy the full SHA 2f96d3aView commit details
Commits on Apr 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for baf6027 - Browse repository at this point
Copy the full SHA baf6027View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.