{"id":"datadog","kind":"sdk","name":"Datadog","slug":"datadog","description":"APM, metrics, logs, and RUM client libraries for Datadog.","vendor":"Datadog","languages":["python","nodejs","javascript","go","java","ruby","php","csharp","kotlin"],"categories":["observability","analytics"],"homepage":"https://www.datadoghq.com","docsUrl":"https://docs.datadoghq.com","githubUrl":"https://github.com/DataDog","tags":["apm","metrics","logs"],"packages":[{"registry":"npm","name":"dd-trace","url":"https://www.npmjs.com/package/dd-trace"},{"registry":"npm","name":"@datadog/datadog-api-client","url":"https://www.npmjs.com/package/@datadog/datadog-api-client"},{"registry":"pypi","name":"ddtrace","url":"https://pypi.org/project/ddtrace/"},{"registry":"pypi","name":"datadog","url":"https://pypi.org/project/datadog/"}],"skills":[{"name":"dd-apm","url":"https://skills.sh/datadog-labs/agent-skills/dd-apm","install":"npx skills add datadog-labs/agent-skills --skill dd-apm","sdk":"datadog","key":"datadog/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.","hasContent":true,"content":"---\nname: dd-apm\ndescription: 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.\nalwaysApply: true\nmetadata:\n  version: \"1.1.0\"\n  author: datadog-labs\n  repository: https://github.com/datadog-labs/agent-skills\n  tags: datadog,apm,tracing,performance,distributed-tracing,dd-apm,install,onboarding,instrumentation,ssi,agent\n  globs: \"**/ddtrace*,**/datadog*.yaml,**/*trace*\"\n---\n\n# Datadog APM\n\nDistributed tracing, service maps, and performance analysis.\n\n## Routing — Read This First\n\nMatch 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.\n\n---\n\n**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.\n\n**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.\n\n> **Common wrong approaches that LOOK like they work but silently fail:**\n> - `helm install datadog datadog/datadog` — the standard chart does NOT support SSI via DatadogAgent CR.\n> - Adding `ddtrace` imports or `ddtrace-run` to the app — SSI auto-instruments WITHOUT any code changes.\n> - `admission.datadoghq.com/enabled` annotations — that's admission controller config injection, not SSI init container injection.\n\n---\n\n**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.\n\n**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.\n\n> **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.\n\n---\n\n**Service rename / service remapping** — trigger when the user mentions renaming a service, collapsing multiple service names, stripping suffixes/prefixes, or cleaning up inferred services.\n\n**Immediately read** `.claude/skills/dd-apm/service-remapping/SKILL.md` now — do not proceed from memory.\n\n> **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.\n\n---\n\n### Overlap disambiguation\n\nWhen a request could plausibly fit more than one entry above, use these tiebreakers:\n\n| Hint | Route to |\n|---|---|\n| Cluster orchestrator mentioned (EKS/GKE/AKS/kind/K3s/minikube) — even if \"just one node\" | k8s-ssi |\n| Single host, VM, or EC2 with no orchestrator | linux-ssi |\n| \"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) |\n| \"My service shows under the wrong name\" | First check `DD_SERVICE` on the deploy. If correct and the name is still wrong → service-remapping. |\n| \"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. |\n\n---\n\n### None of the above\n\nIf 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.\n\n---\n\n## Requirements\n\nDatadog Labs Pup should be installed. See [Setup Pup](https://github.com/datadog-labs/agent-skills/tree/main?tab=readme-ov-file#setup-pup) if not.\n\n## Command Execution Order (Token-Efficient)\n\nFor scoped commands, use this order:\n\n1. Check context first (prior outputs, conversation, saved values).\n2. If a required value is missing, run a discovery command first.\n3. If still ambiguous, ask the user to confirm.\n4. Then run the target command.\n5. Avoid speculative commands likely to fail.\n\n## Quick Start\n\n```bash\npup auth login\n# Confirm env tag with the user first (do not assume production/prod/prd).\npup apm services list --env <env> --from 1h --to now\npup traces search --query \"service:api-gateway\" --from 1h\n```\n\n## Services\n\n### List Services\n\n```bash\npup apm services list --env <env> --from 1h --to now\npup apm services stats --env <env> --from 1h --to now\n```\n\n### Service Stats\n\n```bash\npup apm services stats --env <env> --from 1h --to now\n```\n\n### Service Map\n\n```bash\n# View dependencies\npup apm flow-map --query \"service:api-gateway&from=$(($(date +%s)-3600))000&to=$(date +%s)000\" --env <env> --limit 10\n```\n\n## Traces\n\n### Search Traces\n\n```bash\n# By service\npup traces search --query \"service:api-gateway\" --from 1h\n\n# Errors only\npup traces search --query \"service:api-gateway status:error\" --from 1h\n\n# Slow traces (>1s)\npup traces search --query \"service:api-gateway @duration:>1000ms\" --from 1h\n\n# With specific tag\npup traces search --query \"service:api-gateway @http.url:/api/users\" --from 1h\n```\n\n### Trace Detail\n\n```bash\n# No direct get command for a single trace ID.\n# Use traces search with a narrow query and time window.\npup traces search --query \"trace_id:<trace_id>\" --from 1h\n```\n\n## Key Metrics\n\n| Metric | What It Measures |\n|--------|------------------|\n| `trace.http.request.hits` | Request count |\n| `trace.http.request.duration` | Latency |\n| `trace.http.request.errors` | Error count |\n| `trace.http.request.apdex` | User satisfaction |\n\n## Service Level Objectives\n\nLink APM to SLOs:\n\n```bash\npup slos create --file slo.json\n```\n\n## Common Queries\n\n| Goal | Query |\n|------|-------|\n| Slowest endpoints | `avg:trace.http.request.duration{*} by {resource_name}` |\n| Error rate | `sum:trace.http.request.errors{*} / sum:trace.http.request.hits{*}` |\n| Throughput | `sum:trace.http.request.hits{*}.as_rate()` |\n\n## Troubleshooting\n\n| Problem | Fix |\n|---------|-----|\n| No traces | Check ddtrace installed, DD_TRACE_ENABLED=true |\n| Missing service | Verify DD_SERVICE env var |\n| Traces not linked | Check trace headers propagated |\n| High cardinality | Don't tag with user_id/request_id |\n\n## References/Docs\n\n- [APM Setup](https://docs.datadoghq.com/tracing/)\n- [Trace Search](https://docs.datadoghq.com/tracing/trace_explorer/)\n","contentSource":"skills.sh/api/download/datadog-labs/agent-skills/dd-apm","contentFetchedAt":"2026-07-27T08:59:26.391Z"}],"official":true,"generatedAt":"2026-07-27T09:02:29.956Z"}