이 페이지는 아직 한국어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

Overview

Customize your alerts in Synthetic Monitoring to give on-call responders meaningful context. Synthetic Monitoring’s message templating system lets you enrich alerts with test details, extract data from test results, and route notifications conditionally based on the failure.

Synthetic Monitoring notifications are not supported in your Continuous Testing CI/CD pipelines.

Pre-filled monitor messages

Synthetic Monitoring provides pre-filled messages with no setup required; each alert includes the test name, failing locations, a link to the result, and metadata such as:

  • Test name
  • Monitor ID
  • Failing locations
  • Last failed test run information
  • Time the test started failing

These values appear automatically in most notification channels without any configuration.

Synthetic Monitoring monitor section, highlighting the pre-filled monitor messages

To include additional test result data beyond the defaults, use handlebar formatting in your monitor message.

Display the HTTP request and response details from an API test, including the method, URL, headers, body, status code, and any redirects.

Request:

{{#with synthetics.attributes.result.request}}
We made a {{method}} request to `{{{url}}}`{{#if headers}} with the following headers:

{{#each headers}}
{{@key}}={{this}}
{{/each}}

{{/if}}
{{#if body}}And the body:

{{{body}}}

{{/if}}
{{/with}}

Response:

{{#with synthetics.attributes.result.response}}
We received an HTTP {{httpVersion}} response with a {{statusCode}} status code{{#if headers}} with the following headers:

{{#each headers}}
{{@key}}={{this}}
{{/each}}

{{/if}}
{{#if redirects}}
Redirections:
{{#each redirects}}
* {{statusCode}} redirect to `{{{location}}}`
{{/each}}
{{/if}}
The body's size was {{eval "humanize_bytes(bodySize)"}}{{#if body}} and contained:

{{{body}}}

{{/if}}
{{/with}}

Display WebSocket test details including the handshake status, request message, and response close status with reason.

{{! Websocket request and response details }}
{{#with synthetics.attributes.result}}
{{#if handshake }}
The handshake received a response with the {{handshake.response.statusCode}} status code.
{{/if}}
{{#if request}}
A WebSocket request was made with the message:

{{{request.message}}}

{{/if}}
{{#if response}}
and the response closed with status code {{response.close.statusCode}} and reason `{{response.close.reason}}`
{{#if response.message}}, containing the message:

{{{response.message}}}

{{else}}.{{/if}}
{{/if}}
{{/with}}

List all config and extracted variables from an API test, showing their names, types, and values. Obfuscated values are hidden for security.

Config variables:

{{#each synthetics.attributes.result.variables.config}}
* **Name:** {{name}}
  Type: {{type}}
  Value: {{#if secure}}*Obfuscated (value hidden)*{{else}}{{value}}{{/if}}
{{/each}}

Extracted Variables (Only visible for recovery notifications):

{{#each synthetics.attributes.result.variables.extracted}}
* **Name:** {{name}}
  Global Variable ID: {{id}}
  Value: {{#if secure}}*Obfuscated (value hidden)*{{else}}{{val}}{{/if}}
{{/each}}

Loop through all steps in a multistep API test and display variables extracted by each successful step.

{{! List extracted variables across all successful steps }}
# Extracted Variables
{{#each synthetics.attributes.result.steps}}
  {{#each variables.extracted}}
  * **Name**: `{{name}}`
    Value: {{#if secure}}*Obfuscated (value hidden)*{{else}}`{{{val}}}`{{/if}}
  {{/each}}
{{/each}}

Loop through all steps in a browser or mobile test and display variables extracted by steps that use the “Extract variable” action.

{{#each synthetics.attributes.result.steps}}
  {{#if extractedValue}}
  * **Name**: {{extractedValue.name}}
    **Value:** {{#if extractedValue.secure}}*Obfuscated (value hidden)*{{else}}{{extractedValue.value}}{{/if}}
  {{/if}}
{{/each}}

Display custom notifications message

Synthetic Monitoring notifications support the ability to display only the custom notification message in alert notifications, hiding all default enriched content such as query details, tags, screenshots, and footers.

By default, all monitors include enriched details in the alert message. This may include:

  • Test metadata
  • Failing step information
  • Screenshots
  • Tags
  • Links to Datadog resources

Notification presets

Use presets to control which content appears:

PresetWhat it showsWhen to use it
show_allAll enriched data, metadata, and handlesDefault; best for email and ticketing channels
hide_handlesAll enriched data, but hides @notification handles (for example, @slack-channel)Prevents duplicate pages when a channel is already notified at the monitor level
hide_allCustom message and event link onlyChat channels where you control the full message format
Synthetic Monitoring monitor page, highlighting the content displayed in notification drop-down

See Monitor Notifications for more information.

Simulate notifications

You can test your notification messages by sending simulated notifications. To do this:

  1. Add a notification handle to your monitor message
  2. Click the Simulate Notifications button:
Synthetics Monitor screen, highlighting the Simulate Notifications button
  1. Select the notification type you want to test and click Send:

    Send a notification simulating a test failure or recovery.

Simulated notifications include [TEST] in their subject lines and use a default monitor name when needed.

Examples:

Email notification simulating a test failure.
Email notification simulating a test recovery.

Important notes about simulated notifications:

  • The test results used in simulations are standardized sample data, not actual results from your specific test configuration.
  • Results vary based on test type, subtype (for API tests), and notification type:
    • Alert notifications: Simulated failure data
    • Recovery notifications: Simulated success data
  • All users receive the same simulated data regardless of their test setup.

Next steps

Further Reading