I have created a Canary that passes an e2e test using pupperteer with the script generated by the Google Chrome extension that records (Cloudwatch Synthetics Recorder).
To this Canary I have created an Alarm that connects us to the Slack ChatBot and sends us when the test has failed. Right now the Alarm is sent like this:
Alarm Details:
- Name: Synthetics-Alarm-test024
- Description: Synthetics alarm metric: Failed GreaterThanOrEqualToThreshold 1
- State Change: OK -> ALARM
- Reason for State Change: Threshold Crossed: 1 out of the last 1 datapoints [1.0 (19/06/24 06:14:00)] was greater than or equal to the threshold (1.0) (minimum 1 datapoint for OK -> ALARM transition).
- Timestamp: Wednesday 19 June, 2024 06:15:10 UTC
- AWS Account: 802464077830
- Alarm Arn: arn:aws:cloudwatch:eu-west-1:602663057630:alarm:Synthetics-Alarm-test024
My problem is that we don’t have any error data (e.g. the click on which the test failed). The data I need is in the Canary in the Issues section:
How can I pass what it says in Issues section (Canary) to the Alarm so that it sends it via Slack, so that we know the reason for the error.
Thanks.