-
Notifications
You must be signed in to change notification settings - Fork 707
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 zerolog logging middleware #224
Conversation
Support retrying gRPCs with chained interceptors
ctxloggers for zap and logrus should live with logging
fixing vet issues ... most relating to the Examples
Add 'grpc.request.deadline' example and fix typo.
Improve logging/*/doc.go
* implement noopTags * fix tag reference
Spelling/grammar corrections for validator docs
* Update server_interceptors.go fix misspelling * Update fieldextractor.go fix misspelling * Update options.go fix misspelling * Update options.go fix comment * Update server_interceptors.go lint comment * Update payload_interceptors.go lint comment * Update client_interceptors.go lint comment * Update payload_interceptors.go lint comment * update docs
* Update DOC.md * fix typo
* Travis will now check to see if the docs have correctly been updated
* adding a CHANGELOG file * fixing styling
* Add exponential backoff functions * Move backoff exponent to backoffutils * Add an exampe for the exponential backoff
* Added retry on server stream call * Updated interceptor suite with restart server and added test cases for stream connection retry * Fixed a typo when initilizaing the restart channel in InterceptorTestSuite * Added a delay when stopping the interceptor suite server * Added another test for ServerStream CallFailsOnDeadlineExceeded * Actually validates the errors in the stream call retry-tc's
* retry: add new BackoffFuncContext type BackoffFuncContext adds the context parameter, allowing the retry function access to the contents of the parent context. Fixes #171 * recovery: add new RecoveryHandlerFuncContext type Allows the user to configure a custom recovery handler that has access to the request scoped values in the context. Fixes #168
Docs will now be only in code / in godoc.org. We should remove the auto generation of docs from this repo, as much as it was nice to have them alongside the code in github it is normal go practice to look for most documentation via godoc.org. The libraries that we have been using to generate the github markdown are no longer maintained and updated in the godoc codebase itself have meant that we would also have to update these dependant libraries ... which I do not think we should take.
* we now will not add the traceId / spanId to ctxtags if it is not sampled * update to add sampled to the tags * code review * OT explicitly check value is true or false * OT not add tag if unknown value
* Update Gopkg.lock * Update go version to 1.11
* grpc ratelimit interceptor * refine ratelimit inteceptor options * add ratelimit interceptor unit test * refactor ratelimit interceptor according to comments * remove useless options and file header * remove tokenbucket ratelimiter implementation from repo * add ratelimit to README.md * put an alwaysPassLimiter in example and remove external dependency
* gRPC Zap ReplaceGrpcLoggerV2 * explicitly allow verbosity to be modified instead of through env var * remove severity * remove levels const * update example * small edits * address nits * make closer to upstream * pass through verbosity * small comment change * address comments * don't export Logger
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
…grpc-middleware into feature/zerolog * 'feature/zerolog' of https://github.com/Ahmet-Kaplan/go-grpc-middleware: import paths are updated
…grpc-middleware into feature/zerolog * 'feature/zerolog' of https://github.com/Ahmet-Kaplan/go-grpc-middleware: import paths are updated
Codecov Report
@@ Coverage Diff @@
## master #224 +/- ##
==========================================
+ Coverage 71.55% 72.43% +0.87%
==========================================
Files 37 42 +5
Lines 1392 1625 +233
==========================================
+ Hits 996 1177 +181
- Misses 347 392 +45
- Partials 49 56 +7
Continue to review full report at Codecov.
|
…grpc-middleware into feature/zerolog * 'feature/zerolog' of https://github.com/Ahmet-Kaplan/go-grpc-middleware: (35 commits) import paths are updated for Travis CI. import paths are updated for Travis CI. All tests are PASSED :) Log initialization fix Log Levels updated Log Levels updated import paths Pointer definitions import paths are updated import paths are updated import paths are updated Add zerolog (much faster than logrus) logging middleware Add go-kit logging middleware golang.org/x/net/context => context (#201) gRPC Zap ReplaceGrpcLoggerV2 (#221) Ratelimit interceptor (#181) golang 1.11 and golang.org/x/net upgrades Add if the trace was sampled to the ctxTags (#184) Remove generation of docs (#183) Add context functions to retry and recover (#172) ...
Inspired from adrien-f PR, I want to add Zerolog logging into that project.
For benchmarks, you can visit that site. Zerolog is much faster than Logrus and Zap as seen.