Skip to content
Datadog APM

Datadog APM Skill

Install, instrument and analyse Datadog APM from an agent — Kubernetes and Linux Single-Step Instrumentation, service remapping, trace search and service maps.

GitHub Docs

Install

Install with the skills CLI

One command for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and dozens of other agents. Needs Node.js; the skill is fetched straight from datadog-labs/agent-skills.

$ npx skills add datadog-labs/agent-skills --skill dd-apm

Run it in a terminal. The CLI finds the agents installed on your machine, asks which ones to add the skill to, and whether to install it into the folder you ran it from or for all your projects.

Other ways to install

Copy the whole skill folder — SKILL.md and any scripts or references beside it — into ~/.claude/skills/dd-apm/, where Claude Code picks it up in every project. Only git is needed.

tmp=$(mktemp -d) && \
  git clone --depth 1 --branch main https://github.com/datadog-labs/agent-skills.git "$tmp" && \
  mkdir -p ~/.claude/skills && \
  cp -R "$tmp"/dd-apm ~/.claude/skills/dd-apm

No scripts or references next to it? Saving the SKILL.md alone as ~/.claude/skills/dd-apm/SKILL.md works too.

Using another agent? Its personal skills folder
Codex
~/.agents/skills/
Cursor
~/.cursor/skills/
GitHub Copilot
~/.copilot/skills/
Gemini CLI
~/.gemini/skills/
Windsurf
~/.codeium/windsurf/skills/
OpenCode
~/.config/opencode/skills/

About

  • Routing table that names the wrong-but-plausible install approaches
  • Kubernetes Single-Step Instrumentation: agent install, enable, verify
  • Linux SSI for single hosts and VMs
  • Service remapping at ingestion instead of redeploying with a new DD_SERVICE
  • Trace search by service, error status, duration and tag
  • Service maps, flow maps and the core trace.http.request metrics

Datadog APM onboarding has a specific failure mode: the commands that look right are the ones that silently do nothing. This official skill is built around that problem. Rather than a flat reference, it opens with a routing table that matches the request to a sub-skill and — crucially — names the wrong approach that appears to work.

The traps it names

Installing Single-Step Instrumentation on Kubernetes via helm install datadog/datadog does not work, because the standard chart does not support SSI through the DatadogAgent custom resource. Adding ddtrace imports or ddtrace-run to the application is unnecessary and misleading, because SSI auto-instruments without code changes. The admission.datadoghq.com/enabled annotation configures admission-controller config injection, not SSI init-container injection. On Linux, apt-get install datadog-agent does not bring host auto-instrumentation with it. Each of these is called out explicitly, and the skill instructs the agent to read the relevant sub-skill rather than proceed from memory.

Routing and disambiguation

Three sub-skill paths are covered: Kubernetes SSI (agent install, enable, verify), Linux SSI (the same three steps for a single host or VM), and service remapping. The remapping guidance is a genuinely useful piece of platform knowledge — renaming a service by editing DD_SERVICE or tags.datadoghq.com/service requires a rollout and only affects new data, whereas a remapping rule rewrites the name at ingestion with no deployment. A tiebreaker table resolves requests that could fit more than one path, and where no sub-skill exists yet (reducing APM cost) it tells the agent to ask whether the user means sampling or retention filters instead of guessing.

Analysis

For day-to-day work it documents pup apm services list/stats, flow maps for dependencies, and trace search by service, error status, duration threshold and tag. The key trace.http.request.* metrics are tabulated with what each measures, along with the standard error-rate, throughput and slowest-endpoint queries. A troubleshooting table maps missing traces and unlinked spans to their usual causes, including the cardinality warning against tagging with user_id or request_id.

One nice detail: the quick start tells the agent to confirm the environment tag with the user rather than assuming prod. Requires the pup CLI. MIT-licensed, published by Datadog Labs.

SKILL.md

The instructions your agent loads, as published by Datadog.

SKILL.md
name
dd-apm
description
APM - install, onboard, instrument, enable, set up, configure, traces, services, dependencies, performance analysis. Use for any request involving Datadog APM setup, instrumentation (SSI, ddtrace, agent install), or analysis.
alwaysApply
true
metadata
version: "1.1.0" author: datadog-labs repository: https://github.com/datadog-labs/agent-skills tags: datadog,apm,tracing,performance,distributed-tracing,dd-apm,install,onboarding,instrumentation,ssi,agent globs: "**/ddtrace*,**/datadog*.yaml,**/*trace*"

Datadog APM

Distributed tracing, service maps, and performance analysis.

Routing — Read This First

Match the user's request to one of the entries below. Each entry has the same shape: triggers → which sub-skill to load → the anti-pattern to avoid. If a request seems to fit more than one entry, see "Overlap disambiguation". If nothing matches, see "None of the above" at the end.

---

Kubernetes APM install / instrument / onboard — trigger when the user mentions Kubernetes, K8s, EKS, GKE, AKS, kind, minikube, K3s, helm, DatadogAgent CR, kubectl, SSI on a cluster, pod injection, or init containers.

Immediately read .claude/skills/dd-apm/k8s-ssi/agent-install/SKILL.md now, then .claude/skills/dd-apm/k8s-ssi/enable-ssi/SKILL.md, then .claude/skills/dd-apm/k8s-ssi/verify-ssi/SKILL.md — do not proceed from memory.

Common wrong approaches that LOOK like they work but silently fail:
- helm install datadog datadog/datadog — the standard chart does NOT support SSI via DatadogAgent CR.
- Adding ddtrace imports or ddtrace-run to the app — SSI auto-instruments WITHOUT any code changes.
- admission.datadoghq.com/enabled annotations — that's admission controller config injection, not SSI init container injection.

---

Linux APM install / instrument / onboard — trigger when the user mentions a single host, VM, EC2 instance, bare-metal, RHEL/Ubuntu/Debian, systemd, or no orchestrator.

Immediately read .claude/skills/dd-apm/linux-ssi/agent-install/SKILL.md now, then .claude/skills/dd-apm/linux-ssi/enable-ssi/SKILL.md, then .claude/skills/dd-apm/linux-ssi/verify-ssi/SKILL.md — do not proceed from memory.

Do NOT install the agent via plain apt-get install datadog-agent (or yum equivalent) and assume SSI follows — host auto-instrumentation requires the install script with the SSI flags, which the sub-skill walks through.

---

Service rename / service remapping — trigger when the user mentions renaming a service, collapsing multiple service names, stripping suffixes/prefixes, or cleaning up inferred services.

Immediately read .claude/skills/dd-apm/service-remapping/SKILL.md now — do not proceed from memory.

Do NOT change tags.datadoghq.com/service labels or DD_SERVICE env vars to rename a service in Datadog. That requires a rollout and only affects new data. Use a service remapping rule — it rewrites the name at ingestion time with no deployment change.

---

Overlap disambiguation

When a request could plausibly fit more than one entry above, use these tiebreakers:

HintRoute to
Cluster orchestrator mentioned (EKS/GKE/AKS/kind/K3s/minikube) — even if "just one node"k8s-ssi
Single host, VM, or EC2 with no orchestratorlinux-ssi
"Several services that should be one"service-remapping — the sub-skill picks the rule type based on whether the duplicates are real instrumented services or inferred entities (DBs, queues, external APIs)
"My service shows under the wrong name"First check DD_SERVICE on the deploy. If correct and the name is still wrong → service-remapping.
"Reduce APM volume / cost / noise"No sub-skill yet. Ask whether the user means sampling (fewer ingested traces) or retention filters (less indexed data) before suggesting commands.

---

None of the above

If the request doesn't match any entry above, continue reading the trace-search, service analysis, and metrics content below. If even that doesn't fit, ask the user to clarify — do not invent a workflow.

---

Requirements

Datadog Labs Pup should be installed. See Setup Pup if not.

Command Execution Order (Token-Efficient)

For scoped commands, use this order:

  1. Check context first (prior outputs, conversation, saved values).
  2. If a required value is missing, run a discovery command first.
  3. If still ambiguous, ask the user to confirm.
  4. Then run the target command.
  5. Avoid speculative commands likely to fail.
Quick Start
pup auth login
# Confirm env tag with the user first (do not assume production/prod/prd).
pup apm services list --env <env> --from 1h --to now
pup traces search --query "service:api-gateway" --from 1h
Services
List Services
pup apm services list --env <env> --from 1h --to now
pup apm services stats --env <env> --from 1h --to now
Service Stats
pup apm services stats --env <env> --from 1h --to now
Service Map
# View dependencies
pup apm flow-map --query "service:api-gateway&from=$(($(date +%s)-3600))000&to=$(date +%s)000" --env <env> --limit 10
Traces
Search Traces
# By service
pup traces search --query "service:api-gateway" --from 1h

# Errors only
pup traces search --query "service:api-gateway status:error" --from 1h

# Slow traces (>1s)
pup traces search --query "service:api-gateway @duration:>1000ms" --from 1h

# With specific tag
pup traces search --query "service:api-gateway @http.url:/api/users" --from 1h
Trace Detail
# No direct get command for a single trace ID.
# Use traces search with a narrow query and time window.
pup traces search --query "trace_id:<trace_id>" --from 1h
Key Metrics
MetricWhat It Measures
trace.http.request.hitsRequest count
trace.http.request.durationLatency
trace.http.request.errorsError count
trace.http.request.apdexUser satisfaction
Service Level Objectives

Link APM to SLOs:

pup slos create --file slo.json
Common Queries
GoalQuery
Slowest endpointsavg:trace.http.request.duration{*} by {resource_name}
Error ratesum:trace.http.request.errors{*} / sum:trace.http.request.hits{*}
Throughputsum:trace.http.request.hits{*}.as_rate()
Troubleshooting
ProblemFix
No tracesCheck ddtrace installed, DD_TRACE_ENABLED=true
Missing serviceVerify DD_SERVICE env var
Traces not linkedCheck trace headers propagated
High cardinalityDon't tag with user_id/request_id
References/Docs
Install
Browse all skills →