Synthetic Monitoring Settings

Overview

On the Synthetic Monitoring Settings page, you can access and control the following topics:

Private locations

For more information, see Run Synthetic Tests from Private Locations.

Global variables

Global variables are variables that are accessible from all your Synthetic tests. They can be used in all single and multistep API tests as well as browser tests of your test suite. To create a global variable, go to the Global Variables tab in the Settings page, and click New Global Variable on the upper right corner.

Choose the type of variable you want to create:

  1. Enter a Variable Name. Your variable name can only use uppercase letters, numbers, and underscores. This name should be unique across your global variables.
  2. Enter a Description for your variable (optional).
  3. Select Tags to associate with your variable (optional).
  4. Enter the Value you want to assign to your variable.
  5. Enable obfuscation of your variable to hide its value on test results (optional).
Global Variable Specify Value

You can create variables from your existing HTTP tests by parsing their associated response headers and body:

  1. Enter a Variable Name. Your variable name can only use uppercase letters, numbers, and underscores.
  2. Enter a Description for your variable (optional).
  3. Select Tags to associate with your variable (optional).
  4. Pick the HTTP test you want to extract your variable from.
  5. Enable obfuscation of your variable to hide its value on test results (optional).
  6. Decide whether to extract your variable from the response headers or from the response body.
    • Extract the value from Response Header: use the full response header for your variable or parse it with a regex.
    • Extract the value from Response Body: parse the response body of the request with a regex, a jsonpath, an xpath, or use the full response body.
Variable from HTTP Test

In addition to extracting a value with a regex, you can also use a regex to parse the following:

  • Match not only the first instance of a pattern, but also all instances of the supplied pattern
  • Ignore the case of the matching pattern
  • Match strings over multiple lines
  • Treat the passed regex pattern as unicode
  • Allow period symbols to identify new lines
  • Match from a given index within a regex pattern
  • Substitute the matching pattern with a supplied value
Parse the response body from an HTTP Test with a regular expression

Variable values are updated whenever the test they are extracted from runs.

To generate and use a TOTP in your tests, create a global variable where you enter a secret key or upload a QR code from your authentication provider.

  1. In Choose variable type, select MFA Token.
  2. In Define Variable, enter a Variable Name. Your variable name can only use uppercase letters, numbers, and underscores.
  3. Enter a Description for your variable (optional).
  4. Select Tags to associate with your variable (optional).
  5. Enter the Secret Key to your variable or upload a QR code image.
  6. Click + Generate to create an OTP. You can copy the generated OTP with the Copy icon.
Create a MFA token

Note: For more information about TOTP-based MFA in a browser test, see the TOTP guide.

Once created, global variables can be used in all Synthetic tests by typing {{ in the field of interest and selecting your global variable. For more information, see the HTTP test, Multistep API test, Browser test configuration, and Steps documentation.

Permissions

By default, only users with the Datadog Admin and Datadog Standard roles can access the Synthetic Monitoring Global Variables page. You can get access to the Global Variables page by having your user upgraded to one of those two default roles.

If you are using the custom role feature, add your user to any custom role that includes synthetics_global_variable_read and synthetics_global_variable_write permissions.

Restrict access

Access restriction is available for customers using custom roles on their accounts.

You can restrict access to a global variable based on the roles in your organization. When creating a global variable, choose which roles (in addition to your user) can read and write your global variable in Permissions settings.

Restrict access to a global variable

Default settings

Default Settings page

Enforced tags

Tag enforcement is an advanced feature included in the Enterprise plan. For all other plans, contact your account representative or success@datadoghq.com to request this feature.

Allow selected tags on your Synthetics tests to be enforced by clicking Enforce tags for usage attributions on all tests.

You can break down cost and usage attributes by services, applications, or teams. Usage attribution tags can take up to fifteen minutes to propagate. For more information, see Usage Attribution.

When you are done enforcing tags, click Save Enforced Tags.

Default locations

Choose the default locations for your API test, multistep API test, or browser test details.

Your options include all of the available managed locations Datadog offers and the private locations you set up for your account.

When you are done selecting locations, click Save Default Locations.

Default browsers and devices

Choose the default browser and device types for your browser test details.

Your options for browsers include Google Chrome, Firefox, Microsoft Edge, and Internet Explorer 11. Your options for devices include a large laptop, a tablet, and a small mobile device.

When you are done selecting browsers and devices, click Save Default Browsers & Devices.

Permissions

By default, only users with the Datadog Admin and Datadog Standard roles can access the Synthetic Monitoring Default Settings page. To get access to the Default Settings page, upgrade your user to one of those two default roles.

If you are using the custom role feature, add your user to any custom role that includes synthetics_default_settings_read and synthetics_default_settings_write permissions.

Integration settings

Integration Settings page

APM integration for browser tests

Allow URLs to add APM integration headers to those URLs. Datadog’s APM integration headers allow Datadog to link browser tests with APM.

Define which endpoints you want to send the APM headers to by entering a URL in the Value field. If the endpoint is being traced and is allowed, your browser test results are automatically tied to its corresponding trace.

Use * to allow wider domain names. For example, adding https://*.datadoghq.com/* allows everything on https://datadoghq.com/.

When you are done adding URLs, click Save APM Integration Settings.

Synthetic data collection and RUM applications

To allow Datadog to collect RUM data from your test runs, click Enable Synthetic RUM data collection. If disabled, you cannot edit the RUM setting in the browser test recorder. When you are done enabling data collection, click Save RUM Data Collection.

Select a RUM application from the Default Application dropdown menu that collects browser test data. When you are done specifying a default application, click Save RUM Data Applications.

For more information, see Explore RUM & Session Replay.

Permissions

By default, only users with the Datadog Admin and Datadog Standard roles can access the Synthetic Monitoring Integration Settings page. To get access to the Integration Settings page, upgrade your user to one of those two default roles.

If you are using the custom role feature, add your user to any custom role that includes synthetics_default_settings_read and synthetics_default_settings_write permissions.

Further Reading