elastic / uptime

This project includes resources and general issue tracking for the Elastic Uptime solution
12 stars 3 forks source link

The last successful screenshot should be from the same location #330

Closed paulb-elastic closed 2 years ago

paulb-elastic commented 3 years ago

When a step fails and we show the screenshot of the last successful check as a comparison to the failure, it does so using the screenshot of the most recent successful test prior to the failure.

However, when tests for the same monitor are running from multiple locations, the screenshot we show will be the most recent (prior to the failure) regardless of location.

It’s not uncommon for websites to deliver different content based on the location of the client. As such, the most recent good image (for comparison) should only be shown from test results from the same location.

In fact, if there are no previous good tests from this location, then no comparison image should be shown (even if there is a good test from a different location), as it’s a misleading comparison.

awahab07 commented 2 years ago

Post FF Testing

LGTM

Monitors with locations (Used oblt-edge for testing)

  1. A successful ping on 1:34:24 PM with first step timestamped at 1:34:13 PM with location spa shows only one (successful) screenshot. spa-heartbeat successful
  2. The same monitor fails for the same location (spa) on the next ping (1:35:24 PM). Notice that there are other successful pings for the same monitor for different locations, in between the last successful spa- and failed spa- ping. spa fail list
  3. The failed step shows two screenshots, the failed one and the last successful one from step 1 above with a link to the "last successful check". The last successful check is from the same location although there were more recent successful steps from other locations. link to success
  4. "the last successful" link correctly takes to the last successful step for the same location. link back to successful

Monitors without locations

  1. Successful step shown on one (successful) screenshot. Screenshot 2021-11-08 at 17 20 21
  2. A failed step doesn't show a "last successful check" screenshot if there's no prior successful check. no prior success step
  3. Notice the failed step at 5:18:49 PM, it should mention the step at 5:16:49 PM as "last successful check". Screenshot 2021-11-08 at 17 19 50
  4. It correctly includes and links the last successful check screenshot. Screenshot 2021-11-08 at 17 20 07