Skip to content
Monitoring
Skill

/dt-migration

Migrate Dynatrace classic and Gen2 entity-based DQL to Smartscape equivalents. Covers three scenarios. (1) mass data queries filtered by classic entity conditions — migrate to direct dimension filters first, Smartscape only as fallback; (2) mass data queries using entity

From plugin
dynatrace
18438 skills1 MCP

Claude Code

$ npx -y skills add Dynatrace/dynatrace-for-ai --skill dt-migration --agent claude-code

SKILL.md

dt-migration.SKILL.md
name: dt-migration
description: Migrate Dynatrace classic and Gen2 entity-based DQL to Smartscape equivalents. Covers three scenarios. (1) mass data queries filtered by classic entity conditions — migrate to direct dimension filters first, Smartscape only as fallback; (2) mass data queries using entity subqueries for filtering — same dimension-first strategy; (3) pure entity list queries — migrate fetch dt.entity.* to smartscapeNodes. Also handles entityName, entityAttr, classicEntitySelector, and classic relationship patterns.
license: Apache-2.0

Smartscape Migration Skill

This skill migrates Dynatrace classic and Gen2 entity-based DQL queries and query patterns to Smartscape-based equivalents.

Load the **dt-dql-essentials** skill before writing final DQL so the translated query also follows current DQL syntax rules.

This skill focuses on Smartscape-oriented DQL migration only. It does not cover asset-level migration workflows.

Query Purpose Classification

**Start here.** The correct migration strategy depends on what the query is actually trying to do — not just which classic constructs it uses.

There are three distinct situations:

| # | Situation | Classic anti-pattern | Migration strategy | | --- | --- | --- | --- | | 1 | Mass data query filtered by entity conditions | `classicEntitySelector(...)` inline in `filter:` of a timeseries, logs, or metrics query | Resolve entity conditions to raw data dimensions first. Smartscape is a fallback, not the default. | | 2 | Mass data query using entity subquery for filtering | `fetch dt.entity.*` inside `in [...]`, `lookup [...]`, or `join [...]` to filter the outer mass data query | Same dimension-first strategy. Rewrite as raw dimension filter or `in [smartscapeNodes ...]` subquery. | | 3 | Pure entity list query | `fetch dt.entity.*` used standalone or as the primary result source | `smartscapeNodes` is the only valid path. No raw dimension alternative exists. |

**Decision:**

  • **Situations 1 or 2** — load [references/mass-data-filtering-strategy.md](references/mass-data-filtering-strategy.md) and complete **all steps** including field discovery (Step 2) and equivalence verification (Step 4). Do not skip the `fieldsSnapshot` gates — they determine which approach is viable. Only fall back to the Migration Workflow below when the entity-type mapping or relationship traversal is needed to complete a Smartscape subquery.
  • **Situation 3** — continue with the Migration Workflow and entity mapping table below.

> Note: Situation 3 has a sub-case where `classicEntitySelector` is used to filter the entities returned by `fetch dt.entity.*`. This is rare and follows the same `smartscapeNodes` path — resolve the selector conditions using [references/mass-data-filtering-strategy.md](references/mass-data-filtering-strategy.md) Step 1B, then apply them as node filters in `smartscapeNodes`.

Migration Workflow

Follow this order for **Situation 3** (pure entity list queries) and for constructing Smartscape subqueries in Situations 1 and 2:

1. Identify the classic input pattern:

  • `fetch dt.entity.*`
  • `classicEntitySelector(...)`
  • relationship field access such as `belongs_to[...]`, `runs[...]`, `instance_of[...]`
  • signal or event queries using `dt.entity.*`

2. Identify the involved classic entity types. 3. Look up the Smartscape replacement in the core entity mapping table below. 4. Check which classic DQL constructs need explicit migration. 5. Rewrite the query using Smartscape primitives:

  • `smartscapeNodes`
  • `smartscapeEdges`
  • `traverse`
  • `references`
  • `getNodeName()`
  • `getNodeField()`

6. Check for special cases, unsupported entities, or ID assumptions. 7. Load the matching detailed references for the specific entity family or migration pattern.

For the full migration process and output expectations, load [references/migration-workflow.md](references/migration-workflow.md).

Core Entity Mapping Table

Use this compact table first for common migrations. For the full mapping set, load [references/type-mappings.md](references/type-mappings.md).

| Classic / Gen2 entity | Smartscape field | Smartscape node type | Notes | | --- | --- | --- | --- | | `dt.entity.host` | `dt.smartscape.host` | `HOST` | Standard host mapping | | `dt.entity.service` | `dt.smartscape.service` | `SERVICE` | Standard service mapping | | `dt.entity.process_group_instance` | `dt.smartscape.process` | `PROCESS` | Process instance maps directly | | `dt.entity.container_group_instance` | `dt.smartscape.container` | `CONTAINER` | Container-group instance maps directly | | `dt.entity.kubernetes_cluster` | `dt.smartscape.k8s_cluster` | `K8S_CLUSTER` | Kubernetes cluster | | `dt.entity.kubernetes_node` | `dt.smartscape.k8s_node` | `K8S_NODE` | Kubernetes node | | `dt.entity.kubernetes_service` | `dt.smartscape.k8s_service` | `K8S_SERVICE` | Kubernetes service | | `dt.entity.cloud_application` | multiple workload fields | multiple K8S workload node types | Maps to multiple workload types; load the cloud-application guide | | `dt.entity.cloud_application_instance` | `dt.smartscape.k8s_pod` | `K8S_POD` | Classic cloud app instance becomes pod | | `dt.entity.cloud_application_namespace` | `dt.smartscape.k8s_namespace` | `K8S_NAMESPACE` | Namespace mapping | | `dt.entity.application` | `dt.smartscape.frontend` | `FRONTEND` | Frontend application mapping | | `dt.entity.aws_lambda_function` | `dt.smartscape.aws.lambda_function` | `AWS_LAMBDA_FUNCTION` | Cloud-function entity mapping |

DQL Constructs to Inspect During Migration

These classic constructs usually need explicit rewriting:

| Classic construct | Typical Smartscape replacement | Notes | | --- | --- | --- | | `entityName(x)` | `name` or `getNodeName(x)` | Prefer `name` when querying nodes directly | | `entityAttr(x, "...")` | direct node field or `getNodeField(x, "...")` | Prefer direct fields when available | | `classicEntitySelector(...)` | node filters plus `trave

Read more
@dynatrace
Ships withdynatrace

Everything AI agents need to work with Dynatrace, starting with skills. Skills are portable knowledge packages following the Agent Skills open format. They give AI coding agents the domain-specific context to query, analyze, and interpret Dynatrace data.

18438 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
184
Star history of Dynatrace/dynatrace-for-ai on GitHub, a chart by star-history.com

Other skills on dynatrace.

dt-alerting

dt-alerting

End-to-end Dynatrace alerting lifecycle — anomaly detector setup and model selection (static threshold, adaptive baseline,…

@dynatrace@dynatraceInstall Skill
dt-app-dashboards

dt-app-dashboards

Work with Dynatrace dashboards - create, modify, query, and analyze dashboard JSON including tiles, layouts, DQL queries,…

@dynatrace@dynatraceInstall Skill
dt-app-notebooks

dt-app-notebooks

Work with Dynatrace notebooks - create, modify, query, and analyze notebook JSON including sections, DQL queries, and…

@dynatrace@dynatraceInstall Skill
dt-dql-essentials

dt-dql-essentials

Core DQL syntax, pitfalls, query patterns, and query optimization. Load to write, build, fix, or OPTIMIZE a DQL query — prevents…

@dynatrace@dynatraceInstall Skill
dt-js-runtime

dt-js-runtime

Dynatrace server-side JS runtime — function contract, runtime limits, Web APIs, Node.js modules, fetch with credential vault, and…

@dynatrace@dynatraceInstall Skill
dt-obs-analytics

dt-obs-analytics

Analyze dashboards and notebooks using Davis analyzers — anomaly detection, novelty scoring, and correlation. Use when the user…

@dynatrace@dynatraceInstall Skill

More skills from other plugins.

agentdb-advanced

agentdb-advanced

Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid…

ruview3d104k
@ruvnet@ruvnetInstall Skill
install

install

Kubeshark installation and deployment skill. Use this skill whenever the user wants to install Kubeshark, deploy Kubeshark to a…

@kubeshark@kubesharkInstall Skill
scan

scan

Scan a project with sentrux to get structural health grades (A-F) across 14 dimensions including coupling, cycles, cohesion, dead…

sentrux8mo3.3k
@sentrux@sentruxInstall Skill
phone-input

phone-input

Call the user on the phone for real-time voice conversations. Use this when you need input, want to report on completed work, or…

callme7mo2.7k
@zeframlou@zeframlouInstall Skill

Questions about dt-migration.

Which coding agents can use dt-migration?
dt-migration installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.