ES storage: logging number of total and failed requests#902
Merged
yurishkuro merged 2 commits intojaegertracing:masterfrom Jun 30, 2018
Merged
Conversation
Signed-off-by: Tomasz Adamski <tomasz.adamski@gmail.com>
756b01e to
225ff97
Compare
Contributor
Author
|
hm, I've noticed that we are already logging response. Should we remove it also as it may contain the same number of entries as requests? |
Codecov Report
@@ Coverage Diff @@
## master #902 +/- ##
=======================================
Coverage 99.96% 99.96%
=======================================
Files 126 126
Lines 6072 6072
=======================================
Hits 6070 6070
Misses 2 2Continue to review full report at Codecov.
|
yurishkuro
reviewed
Jun 30, 2018
pkg/es/config/config.go
Outdated
| failed := 0 | ||
| if response.Failed() != nil { | ||
| failed = len(response.Failed()) | ||
| } |
Member
There was a problem hiding this comment.
failed := len(response.Failed()) is sufficient, since len(nil) == 0
pkg/es/config/config.go
Outdated
| total := len(requests) | ||
| logger.Error("Elasticsearch could not process bulk request", zap.Error(err), | ||
| zap.Any("response", response)) | ||
| zap.Any("response", response), zap.Int("failed_number", failed), |
Member
There was a problem hiding this comment.
- let's put one arg per line, including error
- rename to request_count and failed_count
- I would order the fields: request_count, failed_count, error, response
Signed-off-by: Tomasz Adamski <tomasz.adamski@gmail.com>
32c8068 to
c8dfec8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Plz, review it as I am not golang native ;)
Which problem is this PR solving?
Short description of the changes