AWS Synthetic Canary mutli step UI canary

0

Currently I'm using UI synthetic canaries to run a script on a cron and it works great so far! My only thing is that AWS does not seem to support multi step UI canaries. I have a script that currently executes multiple steps, but do to the nature of my application, I need to retry all the steps on some scenarios (I know, not ideal, but that is the case). There are many cases where the first attempt fails, and on a retry it succeeds. But, because I'm using executeStep, even if it fails once on the first try and every step succeeds on the subsequent, the whole canary is marked as failed. https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Samples.html there seems to be support for multi step API canary, but not for UI. My question is, is there a particular reason that the user (me) doesn't have full control on when a canary step failure should/shouldn't mark the whole thing as a failure? I know I can just not use executeStep but then I lose the benefit of having all the functionality it provides.

My way around it is that I currently catch all exceptions in executeStep and re-raise it out of the executeStep function, so that way the canary isn't automatically marked as a failure. The downside to this is that all of the steps are marked as succeeded so not ideal. It's not that I am suggesting that we support multi step for UI canaries, but maybe in the setConfig options here, https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library_Nodejs.html#CloudWatch_Synthetics_Library_UIcanaries, the user has the option to do something like failCanaryOnStepFailure: true (this would be applicable to API canaries too)

asked 9 months ago226 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions