> For the complete documentation index, see [llms.txt](https://docs.thousandeyes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thousandeyes.com/product-documentation/integration-guides/custom-built-integrations/distributed-tracing/distributed-tracing-dynatrace-apm.md).

# Distributed Tracing with Dynatrace® Platform

This guide explains how to configure the Dynatrace Platform for ThousandEyes Distributed Tracing integration. This integration helps you trace requests across services and identify whether issues are caused by the network or the application layer.

## Requirements

Before you start, ensure the following requirements are met:

* The monitored endpoint is configured correctly. See [Monitored Endpoint Requirements](https://docs.thousandeyes.com/product-documentation/integration-guides/custom-built-integrations/distributed-tracing#monitored-endpoint-requirements).
* You have access to [Dynatrace](https://www.dynatrace.com/).
  * Your Dynatrace tenant must include the Grail functionality, available with a Dynatrace Platform Subscription (DPS) license.
  * Your user account must have the following permissions: *Standard User*, *Read Spans*, and *All Grail data read access*.
* You have [created a ThousandEyes test with distributed tracing](https://docs.thousandeyes.com/product-documentation/integration-guides/custom-built-integrations/distributed-tracing#create-a-thousandeyes-test-with-distributed-tracing).

## Configuration Steps

### Step 1: Create a Dynatrace Platform Token

Create a Dynatrace platform token with the correct scopes to retrieve traces from Grail.

1. Go to [Dynatrace platform tokens](https://myaccount.dynatrace.com/platformTokens).
2. Enter a name and expiration time.
3. In token scopes, select `storage:spans:read` and `storage:buckets:read`.
4. Generate the token and copy it.

{% hint style="warning" %}
Your user account must include the scopes required by the API. To view or edit your permissions, see [Edit existing users in Dynatrace](https://docs.dynatrace.com/docs/manage/identity-access-management/user-and-group-management/access-user-management#edit-existing-user).\
If you don’t have permission, contact your administrator.
{% endhint %}

For more information, see [Permissions in Grail](https://docs.dynatrace.com/docs/discover-dynatrace/platform/grail/data-model/assign-permissions-in-grail).

### Step 2: Create the Dynatrace Platform Integration in ThousandEyes

1. In ThousandEyes, go to **Manage > Integrations > Integrations 2.0**.
2. Create a **Generic Connector** with the following details:
   * **Target URL**: `https://<ENVIRONMENT>.apps.dynatrace.com`. Replace `<ENVIRONMENT>` with your Dynatrace environment ID (for example, `eff91928`).
   * **Authentication**:

     * In **Auth Type**, select **Bearer Token**.
     * For the token value, enter the platform token you created.

     ![Dynatrace Platform Generic Connector](/files/JADJSawO9YXLIFy3bRy5)
3. Create an operation:

   1. Click **+ New Operation**.
   2. Choose **Dynatrace® Platform for ThousandEyes Distributed Tracing**.
   3. Enter an **Operation Name**.
   4. Enable the operation.

   ![Dynatrace Platform Operation](/files/GqV9AaeiBAB0VpgY5Qlh)

### Step 3: View the Service Map

![Service Map](/files/kyRR1ANULtwXouP0PVYJ)

1. Open the **Service Map** tab in ThousandEyes.
2. Use the map to analyze the trace path. You can identify:
   * The services involved in the request.
   * Any latency issues, highlighted in red if thresholds are exceeded.
   * Any errors between services, shown as red lines if a request fails.
   * Trace metadata, such as the trace ID and request flow details.

### Step 4: Debug the Trace in Dynatrace

In the **Service Map** tab in ThousandEyes, click the link to open the trace in the Dynatrace distributed tracing app. You can then:

* Drill into service-level trace data.
* Use Dynatrace's trace search, filters, and dashboards for deeper analysis.

![Trace in Dynatrace](/files/pwnVJw2gYb7KNZBnKEZP)
