From 94fe2dacb603d65289403ae8ff1821499a4a42a4 Mon Sep 17 00:00:00 2001 From: thang62590 Date: Mon, 22 Dec 2025 14:48:56 -0500 Subject: [PATCH 01/14] Update template_variables.md --- .../notifications/template_variables.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/content/en/synthetics/notifications/template_variables.md b/content/en/synthetics/notifications/template_variables.md index 99f7420e4fc..be9ba98029a 100644 --- a/content/en/synthetics/notifications/template_variables.md +++ b/content/en/synthetics/notifications/template_variables.md @@ -52,17 +52,20 @@ Test failed at step {{synthetics.failed_step.name}} with error: {{synthetics.fai {{< tabs >}} {{% tab "Test Info" %}} -`.test` -: Info about the test +`synthetics.attributes.test` +: The `test` object contains information about the test like its `name`, `type`, `subtype`, and `id` -`.test.id` -: Public ID (for example, `abc-def-ghi`) +`synthetics.attributes.test.name` +: The name of the test -`.test.type` +`synthetics.attributes.test.type` : Test type (for example, `api`) -`.test.subType` -: Subtype for API tests (for example, `http`) +`synthetics.attributes.test.subType` +: Subtype for API tests (for example, `http`, `dns`, and `multi`) + +`synthetics.attributes.test.id` +: The test ID is the test's public ID (for example, `abc-def-ghi`) {{% /tab %}} {{% tab "Location" %}} From 6fecbbce9f61fbbb9c8bceec2ffbe0b5d511133c Mon Sep 17 00:00:00 2001 From: thang62590 Date: Mon, 22 Dec 2025 14:59:59 -0500 Subject: [PATCH 02/14] Update template_variables.md added location template variable --- .../en/synthetics/notifications/template_variables.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/content/en/synthetics/notifications/template_variables.md b/content/en/synthetics/notifications/template_variables.md index be9ba98029a..23f73d077e1 100644 --- a/content/en/synthetics/notifications/template_variables.md +++ b/content/en/synthetics/notifications/template_variables.md @@ -70,10 +70,16 @@ Test failed at step {{synthetics.failed_step.name}} with error: {{synthetics.fai {{% /tab %}} {{% tab "Location" %}} -`.location.id` +`synthetics.attributes.location` +: The `location` object contains information about the location of where the test is run like its `name` and `id` + +`synthetics.attributes.location.id` : Location ID (for example, `aws:eu-central-1`) -`.location.privateLocation` +`synthetics.attributes.location.name` +: Name of the location (for example, `Frankfurt (AWS)`) + +`synthetics.attributes.location.privateLocation` : `true` for Private Locations {{% /tab %}} From f71e5efc19753cad35c998d748cc1fd9ecc3dd4c Mon Sep 17 00:00:00 2001 From: thang62590 Date: Mon, 22 Dec 2025 15:18:33 -0500 Subject: [PATCH 03/14] Update template_variables.md added template variables for synthetics.attributes.device --- .../notifications/template_variables.md | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/content/en/synthetics/notifications/template_variables.md b/content/en/synthetics/notifications/template_variables.md index 23f73d077e1..9bb39f58958 100644 --- a/content/en/synthetics/notifications/template_variables.md +++ b/content/en/synthetics/notifications/template_variables.md @@ -52,34 +52,34 @@ Test failed at step {{synthetics.failed_step.name}} with error: {{synthetics.fai {{< tabs >}} {{% tab "Test Info" %}} -`synthetics.attributes.test` +`{{synthetics.attributes.test}}` : The `test` object contains information about the test like its `name`, `type`, `subtype`, and `id` -`synthetics.attributes.test.name` +`{{synthetics.attributes.test.name}}` : The name of the test -`synthetics.attributes.test.type` +`{{synthetics.attributes.test.type}}` : Test type (for example, `api`) -`synthetics.attributes.test.subType` +`{{synthetics.attributes.test.subType}}` : Subtype for API tests (for example, `http`, `dns`, and `multi`) -`synthetics.attributes.test.id` +`{{synthetics.attributes.test.id}}` : The test ID is the test's public ID (for example, `abc-def-ghi`) {{% /tab %}} {{% tab "Location" %}} -`synthetics.attributes.location` -: The `location` object contains information about the location of where the test is run like its `name` and `id` +`{{synthetics.attributes.location}}` +: The `location` object contains information about the location of where the test is run from -`synthetics.attributes.location.id` +`{{synthetics.attributes.location.id}}` : Location ID (for example, `aws:eu-central-1`) -`synthetics.attributes.location.name` +`{{synthetics.attributes.location.name}}` : Name of the location (for example, `Frankfurt (AWS)`) -`synthetics.attributes.location.privateLocation` +`{{synthetics.attributes.location.privateLocation}}` : `true` for Private Locations {{% /tab %}} @@ -87,22 +87,25 @@ Test failed at step {{synthetics.failed_step.name}} with error: {{synthetics.fai Applies to browser and mobile tests. -`.device.id` +`{{synthetics.attributes.device}}` +: The `device` object contains information about the device on which the test is run on + +`{{synthetics.attributes.device.id}}` : Device identifier -`.device.name` +`{{synthetics.attributes.device.name}}` : Human-readable device name -`.device.type` +`{{synthetics.attributes.device.type}}` : Device type classification -`.device.resolution.width`, `.device.resolution.height` +`{{synthetics.attributes.device.width}}`, `{{synthetics.attributes.device.height}}` : Screen resolution dimensions -`.device.browser.type` +`{{synthetics.attributes.device.browser.type}}` : Browser type (browser tests only) -`.device.platform.name`, `.device.platform.version` +`{{synthetics.attributes.device.platform.name}}`, `{{synthetics.attributes.device.platform.version}}` : Platform information (mobile tests only) **Example values:** From dca8cc89b1d719f174df3eaf44ab0d0cf4e1ad4d Mon Sep 17 00:00:00 2001 From: thang62590 Date: Mon, 22 Dec 2025 15:29:26 -0500 Subject: [PATCH 04/14] Update template_variables.md updated examples for the result object from synthetics.attributes.result --- .../notifications/template_variables.md | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/content/en/synthetics/notifications/template_variables.md b/content/en/synthetics/notifications/template_variables.md index 9bb39f58958..94af7a92793 100644 --- a/content/en/synthetics/notifications/template_variables.md +++ b/content/en/synthetics/notifications/template_variables.md @@ -125,23 +125,29 @@ Applies to browser and mobile tests. {{% /tab %}} {{% tab "Result" %}} -`.result.id` +`{{synthetics.attributes.result}}` +: The `result` object contains information about the executed test run + +`{{synthetics.attributes.result.id}}` : Unique result ID -`.result.status` -: Test execution status +`{{synthetics.attributes.result.status}}` +: Test execution status (for example, `passed` or `failed`) -`.result.duration` +`{{synthetics.attributes.result.duration}}` : Test duration in milliseconds -`.result.testStartedAt`, `.result.testFinishedAt`, `.result.testTriggeredAt` +`{{synthetics.attributes.result.testStartedAt}}`, `{{synthetics.attributes.result.testFinishedAt}}`, `{{synthetics.attributes.result.testTriggeredAt}}` : Epoch timestamps in milliseconds -`.result.failure.message` -: Description of failure +`{{synthetics.attributes.result.failure}}` +: The `failure` object contains information about why the test failed + +`{{synthetics.attributes.result.failure.message}}` +: The failure message -`.result.failure.code` -: Error code +`{{synthetics.attributes.result.failure.code}}` +: The failure code **Example values:** ```json From c5ed2c8bfdfb7e1d7fb64908ad90e1f3383d5a2e Mon Sep 17 00:00:00 2001 From: thang62590 Date: Mon, 22 Dec 2025 16:18:53 -0500 Subject: [PATCH 05/14] Update template_variables.md Updated extracted variables whose value updates a global variable value (eg Variables from Test aka VFT) --- .../synthetics/notifications/template_variables.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/content/en/synthetics/notifications/template_variables.md b/content/en/synthetics/notifications/template_variables.md index 94af7a92793..3b95875cd00 100644 --- a/content/en/synthetics/notifications/template_variables.md +++ b/content/en/synthetics/notifications/template_variables.md @@ -208,18 +208,18 @@ These are extracted variables whose value updates a global variable value. Available only for **successful test results** and **recovery notifications**. -Located at `result.variables.extracted`: +Located at `{{synthetics.attributes.result.variables.extracted}}`: -`.id` +`{{synthetics.attributes.result.variables.extracted.id}}` : Global variable ID -`.name` +`{{synthetics.attributes.result.variables.extracted.name}}` : Variable name -`.secure` +`{{synthetics.attributes.result.variables.extracted.secure}}` : Whether the variable value is obfuscated -`.val` +`{{synthetics.attributes.result.variables.extracted.val}}` : Variable value (note: uses `.val`, not `.value`) **Examples:** @@ -235,7 +235,7 @@ Located at `result.variables.extracted`: {{% /tab %}} {{% tab "Step extracted variables" %}} -For tests with steps, step data is contained in `.steps`. +For tests with steps, step data is contained in `{{synthetics.attributes.result.steps}}`. `.extractedValue.name` : Variable name From 668d638e58f47f8fb2c322f390a41b678ceaec69 Mon Sep 17 00:00:00 2001 From: thang62590 Date: Mon, 22 Dec 2025 16:25:31 -0500 Subject: [PATCH 06/14] Update template_variables.md Updated local variables. Eg these are local variables configured for API tests or defined outside individual steps in step-based tests. --- content/en/synthetics/notifications/template_variables.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/en/synthetics/notifications/template_variables.md b/content/en/synthetics/notifications/template_variables.md index 3b95875cd00..ebc2e148398 100644 --- a/content/en/synthetics/notifications/template_variables.md +++ b/content/en/synthetics/notifications/template_variables.md @@ -179,16 +179,16 @@ These are local variables configured for API tests or defined outside individual Located at `{{synthetics.attributes.result.variables.config}}`: -`.name` +`{{synthetics.attributes.result.variables.name}}` : Variable name -`.type` +`{{synthetics.attributes.result.variables.type}}` : Variable type -`.secure` +`{{synthetics.attributes.result.variables.secure}}` : Whether the variable value is obfuscated -`.value` +`{{synthetics.attributes.result.variables.value}}` : Variable value (non-obfuscated only) **Examples:** From 8965dced261796d4bdbdd0ac82cc49ecad8ba29e Mon Sep 17 00:00:00 2001 From: thang62590 Date: Mon, 22 Dec 2025 16:26:30 -0500 Subject: [PATCH 07/14] Update template_variables.md --- content/en/synthetics/notifications/template_variables.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/en/synthetics/notifications/template_variables.md b/content/en/synthetics/notifications/template_variables.md index ebc2e148398..96899b5709b 100644 --- a/content/en/synthetics/notifications/template_variables.md +++ b/content/en/synthetics/notifications/template_variables.md @@ -179,16 +179,16 @@ These are local variables configured for API tests or defined outside individual Located at `{{synthetics.attributes.result.variables.config}}`: -`{{synthetics.attributes.result.variables.name}}` +`{{synthetics.attributes.result.variables.config.name}}` : Variable name -`{{synthetics.attributes.result.variables.type}}` +`{{synthetics.attributes.result.variables.config.type}}` : Variable type -`{{synthetics.attributes.result.variables.secure}}` +`{{synthetics.attributes.result.variables.config.secure}}` : Whether the variable value is obfuscated -`{{synthetics.attributes.result.variables.value}}` +`{{synthetics.attributes.result.variables.config.value}}` : Variable value (non-obfuscated only) **Examples:** From 5c62405b20c2d5e8f8bad66f2988c918d7310bc9 Mon Sep 17 00:00:00 2001 From: thang62590 Date: Mon, 22 Dec 2025 17:08:27 -0500 Subject: [PATCH 08/14] Update template_variables.md add starturl --- content/en/synthetics/notifications/template_variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/synthetics/notifications/template_variables.md b/content/en/synthetics/notifications/template_variables.md index 96899b5709b..955d4434b5c 100644 --- a/content/en/synthetics/notifications/template_variables.md +++ b/content/en/synthetics/notifications/template_variables.md @@ -337,7 +337,7 @@ Similar to standard API tests, the variables are listed in the `variables.extrac **General:** -`.startUrl` +`{{synthetics.attributes.result.startUrl}}` : URL from test configuration **Steps:** From e92a480affc2b3f3002d4d0b3bac1e3853a37e13 Mon Sep 17 00:00:00 2001 From: thang62590 Date: Wed, 24 Dec 2025 12:10:06 -0500 Subject: [PATCH 09/14] Update conditional_alerting.md Update examples for the Conditional Alerting page. --- .../notifications/conditional_alerting.md | 72 +++++++++++++++---- 1 file changed, 59 insertions(+), 13 deletions(-) diff --git a/content/en/synthetics/notifications/conditional_alerting.md b/content/en/synthetics/notifications/conditional_alerting.md index 52aeef831fc..f278f7a31a1 100644 --- a/content/en/synthetics/notifications/conditional_alerting.md +++ b/content/en/synthetics/notifications/conditional_alerting.md @@ -26,32 +26,78 @@ For more detailed information, see the }} \ No newline at end of file +{{< partial name="whats-next/whats-next.html" >}} From 422908950845bc8ccca58f43f8efb6b7e6ccc3d4 Mon Sep 17 00:00:00 2001 From: thang62590 Date: Wed, 24 Dec 2025 14:37:17 -0500 Subject: [PATCH 10/14] Update advanced_notifications.md Revamp examples and content in the Advanced Notifications page. --- .../notifications/advanced_notifications.md | 79 +++++++++---------- 1 file changed, 36 insertions(+), 43 deletions(-) diff --git a/content/en/synthetics/notifications/advanced_notifications.md b/content/en/synthetics/notifications/advanced_notifications.md index cd2214a5f61..30318b0d850 100644 --- a/content/en/synthetics/notifications/advanced_notifications.md +++ b/content/en/synthetics/notifications/advanced_notifications.md @@ -37,16 +37,6 @@ To display raw values without HTML escaping (for example, URLs, or HTTP response
Certain messaging integrations (such as Google) require triple braces {{{ around template variables to ensure proper formatting when the message is displayed. For example, you can use {{{synthetics.attributes.result.failure.message}}}.
-You can loop over lists (like steps or variables) or access items directly: - -```handlebars -{{list.2.name}} {{! third item }} -{{list.-1.status}} {{! last item }} -{{list[My Complex Name]url}} {{! use bracket notation for complex keys }} -{{list[My Complex Name]failure.code}} -{{list.abc-def-ghi}} {{! access via ID (case-insensitive) }} -``` - ### Human-readable formatting **Note**: All durations are in milliseconds. @@ -80,6 +70,9 @@ You can loop over lists (like steps or variables) or access items directly: ### Conditional alerting based on step ID ```handlebars +{{! +This alert uses the variable shortcut object `{{synthetics.failed_step}}` to match the step id. If the step id matches, notify the relevant recipient. +}} {{#is_exact_match synthetics.failed_step.id "svn-yrx-3xg"}} A backend-related step failed! @slack-backend-team @@ -98,55 +91,55 @@ Use `#each` to loop over dictionaries or lists. You can access: - `@key` → the current key (for dictionaries) - `@index`, `@first`, `@last` → loop metadata -#### Dictionary example: +### Use local variables in a notification ```handlebars -{{#each users}} - # User `{{@key}}` - Name: {{name}} - Permissions: {{permissions}} -{{/each}} - -Users: {{#each users}}`{{@key}}` ({{name}}){{#unless @last}}, {{/unless}}{{/each}} +{{! +The test is configured with three local variables. +The names of the variables are: APP_NAME, APP_URL, and APP_ENVIRONMENT. +The value of the variable can be accessed by passing its name in the config field like `{{synthetics.attributes.result.variables.config[].value}}` +}} +Application: {{synthetics.attributes.result.variables.config[APP_NAME].value}} +URL Tested: {{synthetics.attributes.result.variables.config[APP_URL].value}} +Environment: {{synthetics.attributes.result.variables.config[APP_ENVIRONMENT].value}} ``` -### Use local (config) variables in a notification +### Loop through the steps of a multistep API test ```handlebars -Synthetic Test Failed! - -Application: {{ synthetics.attributes.result.variables.config[APP_NAME].value }} -URL Tested: {{ synthetics.attributes.result.variables.config[APP_URL].value }} -Random value: {{ synthetics.attributes.result.variables.config[NAME].value }} +{{! Print out the details of each step }} +{{#each synthetics.attributes.result.steps}} +Step name: {{name}} +Step status: {{status}} +Step type: {{type}} -Test: {{ synthetics.attributes.test.name }} ({{ synthetics.attributes.test.id }}) -Failed step: {{ synthetics.failed_step.name }} -Location: {{ synthetics.attributes.location.id }} -Result: {{ synthetics.result_url }} + {{! Within each step, print out the details of the extracted variable }} + {{#each variables.extracted}} + Extracted variable name: {{ name }} + Extracted variable value: {{ val }} + {{/each}} -@your-email +{{/each}} ``` -
To loop through all config variables and print their values safely: - +### Loop through the steps of a browser test ```handlebars -{{#each synthetics.attributes.result.variables.config}} -- {{@key}}: {{#if this.secure}}[secure]{{else}}{{this.value}}{{/if}} -{{/each}} -``` +{{! Print out the details of each step }} +{{#each synthetics.attributes.result.steps}} -
+Step name: {{description}} +Step status: {{status}} +Step type: {{type}} -## Steps loop + {{! Print out the details of the extracted variable step }} + {{#is_match "type" "extractVariable"}} + Extracted variable name: {{ extractedValue.name }} + Extracted variable value: {{ extractedValue.value }} + {{/is_match}} -```handlebars -{{#each synthetics.attributes.result.steps}} -* Step name: {{description}} -* Step status: {{status}} -* Step type: {{type}} {{/each}} ``` ## Further Reading -{{< partial name="whats-next/whats-next.html" >}} \ No newline at end of file +{{< partial name="whats-next/whats-next.html" >}} From 77201a180010743e459b68cd8bc4c6bda33bd9d6 Mon Sep 17 00:00:00 2001 From: thang62590 Date: Fri, 26 Dec 2025 12:58:45 -0500 Subject: [PATCH 11/14] Update content/en/synthetics/notifications/template_variables.md Co-authored-by: Alicia Thuerk --- content/en/synthetics/notifications/template_variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/synthetics/notifications/template_variables.md b/content/en/synthetics/notifications/template_variables.md index 955d4434b5c..88a9e2f92bd 100644 --- a/content/en/synthetics/notifications/template_variables.md +++ b/content/en/synthetics/notifications/template_variables.md @@ -65,7 +65,7 @@ Test failed at step {{synthetics.failed_step.name}} with error: {{synthetics.fai : Subtype for API tests (for example, `http`, `dns`, and `multi`) `{{synthetics.attributes.test.id}}` -: The test ID is the test's public ID (for example, `abc-def-ghi`) +: The test's public ID (for example, `abc-def-ghi`) {{% /tab %}} {{% tab "Location" %}} From 10d51175900cb179d06d660657a4bcedbcbdd62b Mon Sep 17 00:00:00 2001 From: thang62590 Date: Fri, 26 Dec 2025 13:20:11 -0500 Subject: [PATCH 12/14] Update content/en/synthetics/notifications/template_variables.md Co-authored-by: Alicia Thuerk --- content/en/synthetics/notifications/template_variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/synthetics/notifications/template_variables.md b/content/en/synthetics/notifications/template_variables.md index 88a9e2f92bd..613dd103e9f 100644 --- a/content/en/synthetics/notifications/template_variables.md +++ b/content/en/synthetics/notifications/template_variables.md @@ -132,7 +132,7 @@ Applies to browser and mobile tests. : Unique result ID `{{synthetics.attributes.result.status}}` -: Test execution status (for example, `passed` or `failed`) +: Test execution status (for example, `passed` or `failed`) `{{synthetics.attributes.result.duration}}` : Test duration in milliseconds From 901c17d90430999dfc6902eb2d04ff0548e66771 Mon Sep 17 00:00:00 2001 From: thang62590 Date: Fri, 26 Dec 2025 13:20:43 -0500 Subject: [PATCH 13/14] Update content/en/synthetics/notifications/conditional_alerting.md Co-authored-by: Alicia Thuerk --- content/en/synthetics/notifications/conditional_alerting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/synthetics/notifications/conditional_alerting.md b/content/en/synthetics/notifications/conditional_alerting.md index f278f7a31a1..2fb57c3ba8e 100644 --- a/content/en/synthetics/notifications/conditional_alerting.md +++ b/content/en/synthetics/notifications/conditional_alerting.md @@ -41,7 +41,7 @@ If a test triggers an alert for an API test and returns a 500 statuscode, notify ```handlebars {{! -If a test triggers an alert for Browser or Mobile tests, loop through each step and find the failed step. +If a test triggers an alert for browser or mobile tests, loop through each step and find the failed step. If the failed step's description field matches Checkout, notify the recipient }} {{#is_alert}} From d3f8112b60dd2135e091d63057ac7315eb202717 Mon Sep 17 00:00:00 2001 From: thang62590 Date: Fri, 26 Dec 2025 13:21:28 -0500 Subject: [PATCH 14/14] Update content/en/synthetics/notifications/conditional_alerting.md Co-authored-by: Alicia Thuerk --- content/en/synthetics/notifications/conditional_alerting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/synthetics/notifications/conditional_alerting.md b/content/en/synthetics/notifications/conditional_alerting.md index 2fb57c3ba8e..16bdbd89e65 100644 --- a/content/en/synthetics/notifications/conditional_alerting.md +++ b/content/en/synthetics/notifications/conditional_alerting.md @@ -58,7 +58,7 @@ If the failed step's description field matches Checkout, notify the recipient ```handlebars {{! This alert uses the `{{synthetics.failed_step}}` object which is a variable shortcut that points to the relevant step data contained in `{{synthetics.attributes.result.steps}}`. -If the test triggers an alert for Browser or Mobile tests and if the failed step's description field matches Checkout, notify the recipient. +If the test triggers an alert for browser or mobile tests, and if the failed step's description field matches Checkout, notify the recipient. }} {{#is_alert}} {{#is_match "synthetics.failed_step.description" "Checkout"}}@notify-slack-payments{{/is_match}}