-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
chore: add stats logging to thumbnail api #16133
Conversation
Codecov Report
@@ Coverage Diff @@
## master #16133 +/- ##
==========================================
- Coverage 76.84% 76.63% -0.21%
==========================================
Files 995 995
Lines 52884 52890 +6
Branches 6721 6721
==========================================
- Hits 40638 40533 -105
- Misses 12021 12133 +112
+ Partials 225 224 -1
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.
LGTM
🏷 2021.31 |
(cherry picked from commit df50a47)
(cherry picked from commit df50a47)
(cherry picked from commit df50a47)
(cherry picked from commit df50a47)
(cherry picked from commit 0db0bfd)
SUMMARY
Adding a few events to related to thumbnail generation. The main driver here is to be able to compute a
thumbnail_cache_hit_rate
DashboardRestApi.thumbnail.async
: endpoint is hit, 202 is returned and async process is triggeredDashboardRestApi.thumbnail.redirect
: thumbnail exists for dashboard, redirecting to the right hash (digest)DashboardRestApi.thumbnail.from_cache
: indicates the thumbnail was loaded from cache (following the redirect)All equivalent events for
ChartRestApi
are also logged the same way.Logically
cache_hit_rate = from_cache/(async+from_cache)
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
Tested thoroughly on docker-compose locally, made sure all the events logged through the dummy stats logger looked as expected