cashapp / logquacious

Logquacious (lq) is a fast and simple log viewer.
Apache License 2.0
59 stars 14 forks source link

Show total count of results upon LQ Search #164

Closed rimpi05 closed 3 years ago

rimpi05 commented 3 years ago

Currently there appears to be no way to easily tell exactly how many total logs were returned in the queried timeframe.

This can be specially lacking/limiting when investigating SEVs or debugging to quickly assess scope/impact This PR adds a simple value indicating that count at the top of the search results.

Please Note - Due to this Elastic optimization the current count added with this PR will be exact only if <= 10k; beyond which the message will be like - Found at least 10K results.

If this works well then as a follow up we can try out track-total-hits feature of Elastic to display exact count for larger (>10k) match results too.

rimpi05 commented 3 years ago

This looks reasonable to me!

Were you table to test it locally (it looks like from reading the README, local testing is possible)?

Would you be able to grab a screenshot of what it's expected that this will look like for reference and attach it to this pull request?

Unfortunately I have not been able to test this locally due to this known bug. Happy to test locally if this can be fixed. Also can pair up with observability folks if their npm install works fine for testing this? As a last resort I was thinking of testing on staging env.

cpakman commented 3 years ago
Screen Shot 2021-10-13 at 7 14 38 PM

Here's what it looks like - any objections?

clarkds14 commented 3 years ago

Thank you for doing this work!