dd-apm

Query Datadog APM traces, services, and dependencies for performance analysis.

5|2|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/lauhon/pi --skill dd-apm-lauhon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dd-apm
Source: https://github.com/lauhon/pi/tree/main/skills/dd-apm
Command: npx skills add https://github.com/lauhon/pi --skill dd-apm-lauhon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Investigating slow endpoints, errors, and service dependencies in distributed systems requires navigating complex APM UIs. This Skill lets you query Datadog APM traces, service statistics, and dependency maps directly from the command line using the pup CLI. ## Core Features & Use Cases - Trace Search & Aggregation: Search traces by service, status, or duration and compute aggregates like average latency, p99, and error counts grouped by resource or service. - Service Analysis: List services, view operations and resources, inspect flow maps, and explore service dependencies per environment. - Config Drift Auditing: Query service instance metadata and tracer library configurations to detect misconfigured tracing, profiling, or AppSec settings across a fleet. - Use Case: When p99 latency spikes on your api-gateway service, search slow traces with duration filters, aggregate by resource name to find the offending endpoint, and check service dependencies for downstream bottlenecks. ## Quick Start Ask the assistant to list all APM services in the production environment and search for error traces from the last hour.

Frequently Asked Questions about dd-apm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search Datadog APM traces from the command line?

Use pup traces search with a query and time range, such as pup traces search --query="service:api-gateway status:error" --from="1h". You can filter by service, status, tags, and duration in nanoseconds.

How to find the slowest endpoints in a Datadog service?

Aggregate traces by resource name using pup traces aggregate with --compute="avg(@duration)" and --group-by="resource_name". This ranks endpoints by average latency so you can identify the slowest ones.

Why does pup apm services list fail with an --env required error?

All pup apm services commands require the --env flag to specify the target environment. Always pass it explicitly, for example pup apm services list --env production.

How do I detect tracer config drift across service instances?

Use pup apm service-library-config get with the --mixed flag to show only configurations where instances disagree. You can filter by service name, environment, and language to audit tracing, profiling, or AppSec settings.

Why are some Datadog traces missing from search results?

Datadog samples traces through head-based sampling, error and slow trace retention, and retention filters. Only indexed spans are searchable, so adjust retention filters if needed traces are not kept.