-
Notifications
You must be signed in to change notification settings - Fork 18
Add log query endpoint #103
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #103 +/- ##
==========================================
- Coverage 65.38% 65.19% -0.20%
==========================================
Files 160 161 +1
Lines 10018 10072 +54
==========================================
+ Hits 6550 6566 +16
- Misses 2786 2803 +17
- Partials 682 703 +21
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes requested
count, err := s.collection.CountDocuments(ctx, q) | ||
if err != nil { | ||
fmt.Fprintf(os.Stderr, "Error while performing count query: %v", err) | ||
return nil, storage.ErrQuery |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to add original err
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's not the concern of the frontend to know the details of the err. And I am logging it already in the server for debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All in all looks good, but there are small things that can make code a bit better
596cfa8
to
0fa2563
Compare
there's still a couple of comments above to address; either as a reply or in code changes |
b18a900
to
ead33a6
Compare
- add GET `log` endpoint to query logs - support text search, date and log level filtering - add integ test for the log query endpoint Signed-off-by: Mohamed Abokammer <[email protected]>
@rihter007 the issues you posted were either resolved or deferred thru issues |
log
endpoint to query logsSigned-off-by: Mohamed Abokammer [email protected]