> ## Documentation Index
> Fetch the complete documentation index at: https://docs.traversal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dynatrace

> Connect Dynatrace to pull entities, problems, metrics, logs, traces, and Grail data during investigations.

Connecting Dynatrace lets Traversal pull entities, Davis-detected problems, metrics, events, logs, and traces during investigations.

## What Traversal reads

* **Entities and topology**: host, service, process, and application entities, plus their dependency relationships
* **Problems**: Davis-detected problems and their evidence
* **Metrics**: time-series data and dimensional metadata
* **Events**: deployment events and other point-in-time signals
* **Logs**: classic log queries and Grail (DQL) log queries
* **Spans and traces**: APM spans and trace context
* **Settings**: read-only access to configuration objects, such as anomaly-detection rules

## Authentication

Traversal talks to Dynatrace through two API surfaces. You can connect either one or both.

| Surface | Host | Authentication | Covers |
| - | - | - | - |
| **Classic Environment API** | `*.live.dynatrace.com` | API token (`dt0c01...`) | Entities, problems, events, classic metrics, classic logs, SLOs |
| **Platform / Grail** | `*.apps.dynatrace.com` | OAuth 2.0 client credentials | DQL queries against logs, events, spans, metrics, and bizevents |

> [!NOTE]
>
> **Pick what fits your tenant:**
>
> * **Dynatrace Managed or self-hosted:** Classic API only. Grail is SaaS-only.
> * **SaaS, Grail-only:** OAuth client only. Problems and entities are still reachable through DQL.
> * **SaaS, mid-migration or using both surfaces:** provide both. Traversal routes each query to the surface that owns the data.

Fill in the section for each surface you want to connect and leave the other empty. The connection check tests every credential you provide and reports pass or fail per surface, so you can see which side is misconfigured.

## Setup

**1. Create a Classic API token**

Skip this step if you're connecting only Grail.

In Dynatrace, open **Settings** → **Integration** → **Dynatrace API** → **Generate token** and name the token (for example, `traversal`). Then choose the read-only scopes to grant. Traversal uses whichever scopes the token carries, so grant the scopes for the data you want available during investigations.

**Minimum**:

| Scope | What it covers |
| - | - |
| `entities.read` | Required to connect. Powers entity-listing and service-dependency lookups. |

**Recommended additions** (grant whichever your security policy allows):

| Scope | What it unlocks |
| - | - |
| `problems.read` | Davis-detected problems (`/api/v2/problems`) |
| `metrics.read` | Metric time-series queries (`/api/v2/metrics/query`) |
| `events.read` | Events including deployments (`/api/v2/events`) |
| `releases.read` | Curated release lists (`/api/v2/releases`); only available on tenants where the Releases feature is enabled. Traversal falls back to events automatically when this scope isn't granted. |
| `settings.read` | Settings 2.0 objects, including anomaly-detection rules (`/api/v2/settings/objects`) |
| `logs.read` | Classic log queries |
| `slo.read` | SLO definitions and status |
| `traces.lookup` | Classic trace lookups |

> [!NOTE]
>
> `entities.read` alone is enough to connect, but Traversal has nothing else to read until you grant the scopes for the other data types.

Click **Generate token** and copy the token. Dynatrace shows it only once.

Note your **Classic Environment URL** in the format `https://<env-id>.live.dynatrace.com`. The environment ID is the subdomain of your Dynatrace UI URL.

> [!NOTE]
>
> For Dynatrace Managed deployments, the URL format is `https://<your-domain>/e/<env-id>`. Traversal supports both.

**2. Create a Platform OAuth client**

Skip this step if you're connecting only the Classic API.

In Dynatrace, open **Account Management** → **Identity & access management** → **OAuth clients** → **Create client**. Name the client (for example, `traversal`) and choose which storage scopes to grant. Traversal queries whichever data types the client can read, so grant the storage scopes for the signals you want available during investigations.

**Minimum**:

| Scope | What it covers |
| - | - |
| *none* | No storage scopes are required to connect. You can save the integration first and grant data scopes later. |

**Recommended additions** (grant whichever your security policy allows):

| Scope | What it unlocks |
| - | - |
| `document:documents:read` | Grail dashboards, so Traversal can surface relevant panels during investigations |
| `storage:buckets:read` | **Required alongside any `storage:<table>:read` scope.** DQL queries (`timeseries`, `fetch metric.*`, `fetch logs`, etc.) succeed but return zero records with a `No bucket permissions for table <name>` notification until this scope is granted. The only DQL table that does *not* need it is `dt.entity.*`. |
| `storage:metrics:read` | Metric records in Grail (pair with `storage:buckets:read`) |
| `storage:logs:read` | Log records in Grail (pair with `storage:buckets:read`) |
| `storage:events:read` | Event records in Grail, including deployment events (pair with `storage:buckets:read`) |
| `storage:spans:read` | Span records in Grail (pair with `storage:buckets:read`) |
| `storage:bizevents:read` | Business event records (pair with `storage:buckets:read`) |
| `storage:system:read` | System tables (e.g. `dt.system.tables`); useful for schema discovery |

> [!NOTE]
>
> Traversal can't read any data from Grail until you grant the relevant `storage:*:read` scopes.

Click **Create client** and copy the **Client ID**, **Client secret**, and **Account URN**. The secret is shown only once.

Note your **Platform URL** in the format `https://<env-id>.apps.dynatrace.com`. The environment ID is the same as in your Classic URL. Only the host suffix differs (`.apps.` instead of `.live.`).

**3. Configure in Traversal**

Go to **Integrations**, select **Dynatrace**, and fill in the section for each surface you're connecting.

**Classic API**

* **Classic Environment URL**: for example, `https://abc12345.live.dynatrace.com`
* **API Token**: the `dt0c01...` token you generated for the Classic API

**Platform / Grail**

* **Platform URL**: for example, `https://abc12345.apps.dynatrace.com`
* **OAuth Client ID**: starts with `dt0s02.`
* **OAuth Client Secret**: the secret you copied
* **Account URN**: format `urn:dtaccount:<uuid>`, found in **Account Management** → **Overview**

Click **Save**. Traversal tests every credential you provided and reports the result per surface. If you connected both, you see a separate pass or fail for Classic and Grail.

## Private network access

If the service endpoint isn't directly reachable by Traversal (as is common with self-hosted services), deploy a [Traversal Connector](https://docs.traversal.com/architecture/connector.md) in a network that can reach it. When configuring the integration, select that connector under **Network Access Needed**. The service endpoint doesn't need public internet exposure.

See [Set up the Traversal Connector](https://docs.traversal.com/setup/connector.md) for deployment and network requirements.

## Troubleshooting

* **Classic connection fails with an `entities.read` permission error.** `entities.read` is the only scope required to connect. Other scopes are needed only for the corresponding queries. Regenerate the token with `entities.read` granted.
* **Integration saves but a specific Dynatrace query returns "no data" or a permission error.** The corresponding scope is likely missing on the token (Classic) or OAuth client (Grail). Add the scope from the tables above and re-save the integration.
* **Classic URL pasted on the Platform host, or the reverse.** Traversal rejects URLs that mix the two surfaces. Use `*.live.dynatrace.com` for Classic and `*.apps.dynatrace.com` for Grail.
* **Grail OAuth connection fails with an SSO error.** Check the Client ID, Client Secret, and Account URN. The Account URN uses the format `urn:dtaccount:<uuid>` from your Dynatrace Account Management page. It isn't the environment ID.

## More information

* [Dynatrace API documentation](https://docs.dynatrace.com/docs/dynatrace-api)
* [Generate access tokens (Classic API)](https://docs.dynatrace.com/docs/manage/access-control/access-tokens)
* [Create OAuth clients (Platform)](https://docs.dynatrace.com/docs/manage/identity-access-management/access-tokens-and-oauth-clients)
* [Dynatrace Query Language (DQL)](https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.