Measure image scaler metric when serving cached images
What does this MR do and why?
Related to #340162 (closed)
With this change, we measure durations in Prometheus (in imageResizeDurations
) whenever the requested image has not been modified and hence the cached version of the image can be used by the client.
In this case, the image re-sizer process is not invoked, but the client gets to see the image resized anyway.
In the measurement of apdex of ImageScaler, it should not ideally matter where does the image come from?
, rather it should only care about how soon is the required image served?
, which is why we have now decided to include the measurement of cached versions
delivery as well.
Before this change, we were collecting this data only for cases where the Image Scaler is actually invoked to resize an image. However, such calls are low in number compared to how many cached versions we serve (Reference: Kibana graph split according to response status), so even a very small number of outliers here was causing the apdex to fall below the threshold.
Screenshots or screen recordings
How to set up and validate locally
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.