Skip to content

Commit

Permalink
Update GV documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaricCalmette committed Dec 20, 2024
1 parent c42df69 commit b569d25
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 22 deletions.
61 changes: 39 additions & 22 deletions content/en/synthetics/platform/settings/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,29 @@ On the [Synthetic Monitoring & Continuous Testing Settings page][1], you can acc

#### Enforce tags for **usage attribution** on all tests

On the Usage Attribution page, you can configure up to three tags by which to break down cost and usage attributes. Select **Enforce tags for usage attribution on all tests** to require that users enter all configured Usage Attribution tags when creating or editing Synthetic tests. With this setting enabled, users cannot save tests without entering all required tags.
On the Usage Attribution page, you can configure up to three tags by which to break down cost and usage attributes. Select **Enforce tags for usage attribution on all tests** to require that users enter all configured Usage Attribution tags when creating or editing Synthetic tests. With this setting enabled, users cannot save tests without entering all required tags.

#### Enforce required **monitor tag policies** on all tests

On the [Synthetic Monitoring and Testing settings][20] page, select **Enforce required monitor tag policies on all tests** to require that user-defined monitor tag policies are enforced on Synthetic tests. With this setting enabled, users cannot save tests without entering all required tags.
On the [Synthetic Monitoring and Testing settings][20] page, select **Enforce required monitor tag policies on all tests** to require that user-defined monitor tag policies are enforced on Synthetic tests. With this setting enabled, users cannot save tests without entering all required tags.

<br>

1. Configure monitor tags on the [**Monitors** > **Settings** > **Policies** page][21]:

<br>

{{< img src="synthetics/settings/monitor_tag_policy.png" alt="Monitor Settings page, showing monitor policy tags that are configured" style="width:80%;">}}

2. Create a Synthetic browser test, and add the required policy tags:

<br>

{{< img src="synthetics/settings/monitor_tags.png" alt="New Synthetics test page, highlighting Policy tags feature" style="width:80%;">}}

### Default locations

Choose the default locations for your [API test][4], [multistep API test][5], or [browser test][6] details.
Choose the default locations for your [API test][4], [multistep API test][5], or [browser test][6] details.

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

Expand Down Expand Up @@ -117,21 +117,21 @@ When you are done entering the default mobile devices, click **Save Default Devi

### Permissions

By default, only users with the [Datadog Admin and Datadog Standard roles][11] 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][11].
By default, only users with the [Datadog Admin and Datadog Standard roles][11] 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][11].

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

## Integration settings

{{< img src="synthetics/settings/integration_settings.png" alt="Integration Settings page" style="width:100%;">}}

### APM integration for browser tests

Datadog's APM integration headers allow Datadog to link browser tests with APM.
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 adding a URL to the **Value** list. 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**.
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**.

For more information, see [Connect Synthetics and APM Traces][15].

Expand All @@ -149,7 +149,7 @@ For more information, see [Run Synthetic Tests from Private Locations][3].

## Global variables

Global variables are variables that are accessible from all your Synthetic tests. They can be used in all [single][4], [multistep API tests][5], [browser tests][6], and [mobile app tests][17] of your test suite.
Global variables are variables that are accessible from all your Synthetic tests. They can be used in all [single][4], [multistep API tests][5], [browser tests][6], and [mobile app tests][17] of your test suite.

To create a global variable, navigate to the **Global Variables** tab on the [**Synthetic Monitoring & Continuous Testing** > **Settings** page][7] and click **+ New Global Variable**.

Expand All @@ -159,9 +159,9 @@ Choose the type of variable you want to create:
{{% tab "Specify Value" %}}

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. Optionally, enter a **Description** and select **Tags** to associate with your variable.
2. Optionally, enter a **Description** and select **Tags** to associate with your variable.
3. Enter the **Value** you want to assign to your variable.
4. Optionally, use built-ins to assign values to your variable. For example, click on the `{{ alphabetic(n) }}` built-in to populate the **Value** field with an example of an alphabetic value.
4. Optionally, use built-ins to assign values to your variable. For example, click on the `{{ alphabetic(n) }}` built-in to populate the **Value** field with an example of an alphabetic value.
5. Optionally, enable obfuscation of your variable to hide its value on test results.

{{< img src="synthetics/settings/variable_value_3.png" alt="Global Variable Specify Value" style="width:100%;">}}
Expand Down Expand Up @@ -201,14 +201,14 @@ You can create variables from your existing [HTTP tests][1] by parsing their ass
{{< img src="synthetics/settings/global_variable.png" alt="Available variables that you can extract from a multistep API test" style="width:100%;" >}}

1. Enter a **Variable Name**. Your variable name can only use uppercase letters, numbers, and underscores.
2. Optionally, enter a **Description** and select **Tags** to associate with your variable.
2. Optionally, enter a **Description** and select **Tags** to associate with your variable.
3. Enable obfuscation of your variable to hide its value on test results (optional).
4. Select the **test** you want to extract a variable from.
5. If you are using a multistep API test, extract your local variable from the test. If you are using an HTTP test, choose to extract your variable from the response header or the response body.

* Extract the value from **Response Header**: Use the full response header for your variable or parse it with a [`regex`][3].
* Extract the value from **Response Body**: Parse the response body of the request with a [`regex`][3], a [`jsonpath`][4], an [`xpath`][5], or use the full response body.
* Extract the value from the **Response Status Code**.
* Extract the value from the **Response Status Code**.

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

Expand All @@ -231,13 +231,13 @@ Variable values are updated whenever the test they are extracted from runs.
[5]: https://www.w3schools.com/xml/xpath_syntax.asp
{{% /tab %}}

{{% tab "MFA Token" %}}
{{% tab "MFA Token" %}}

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. **Note:** Currently, only the SHA1 hashing algorithm is supported for TOTP.

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. Optionally, enter a **Description** and select **Tags** to associate with your variable.
3. Optionally, enter a **Description** and select **Tags** to associate with your variable.
4. Enter the **Secret Key** to your variable or upload a QR code image.
5. Click **+ Generate** to create an OTP. You can copy the generated OTP with the **Copy** icon.

Expand Down Expand Up @@ -265,7 +265,7 @@ To complete a user journey with a passkey in your Synthetics tests, create a Vir
{{% /tab %}}
{{< /tabs >}}

Once created, global variables can be used in all Synthetic tests. To import your global variables into your test, click **+ Variables**, type `{{` in a field you want to add the variable, and select your global variable.
Once created, global variables can be used in all Synthetic tests. To import your global variables into your test, click **+ Variables**, type `{{` in a field you want to add the variable, and select your global variable.


For more information about variables, see the [HTTP test][8], [Multistep API test][9], [Browser test][10], [Mobile app test][19], and [Browser Test Steps documentation][16].
Expand All @@ -278,19 +278,36 @@ If you are using the [custom role feature][12], add your user to any custom role

### Restrict access

Access restriction is available for customers using [custom roles][11] on their accounts. If you are using the [custom role feature][12], add your user to any custom role that includes `synthetics_global_variable_read` and `synthetics_global_variable_write` permissions.
{{< img src="synthetics/settings/grace_1.png" alt="Set permissions for your test" style="width:70%;" >}}

Use [granular access control][24] to limit who has access to your global variable based on roles, teams, or individual users.

To do so:

1. Open the permissions section of the form
2. Click on `edit access`

{{< img src="synthetics/gv_grace.png" alt="Set permissions for your global variable" style="width:70%;" >}}

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**.
3. Click on `restrict access`
4. Select teams, roles, or users
5. Click `add`
6. Select the level of access you want to associate with each of them
7. Click on done

{{< img src="synthetics/settings/restrict_access_1.png" alt="Restrict access to a global variable" style="width:100%;" >}}
| Access level | View GV value | View GV metadata | Use GV in test | Edit GV value/metadata |
| ------------ | --------------| ---------------- | -------------- | ----------------------- |
| No access | | | | |
| Viewer | {{< X >}} | {{< X >}} | {{< X >}} | |
| Editor | {{< X >}} | {{< X >}} | {{< X >}} | {{< X >}} |

## Integration settings

{{< img src="synthetics/settings/integration_settings.png" alt="Integration Settings page" style="width:100%;">}}

### 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.
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.

Expand Down
Binary file added static/images/synthetics/settings/gv_grace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b569d25

Please sign in to comment.